https://github.com/aces/zenodo-client-gem
A Ruby gem implementing the Zenodo API.
Science Score: 33.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
1 of 1 committers (100.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.7%) to scientific vocabulary
Repository
A Ruby gem implementing the Zenodo API.
Basic Info
- Host: GitHub
- Owner: aces
- Language: Ruby
- Default Branch: master
- Size: 50.8 KB
Statistics
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
zenodo_client
ZenodoClient - the Ruby gem for the Zenodo API
This is for the zenodo API http://developers.zenodo.org/#rest-api
This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.RubyClientCodegen For more information, please visit https://github.com/aces/zenodo-client-gem
The Swagger 2.0 API description was created by Pierre Rioux (pierre.rioux@mcgill.ca); the description is available on SwaggerHub and is also available in this repo in the file zenodo_1.0.0.yaml
Installation
Build a gem
To build the Ruby code into a gem:
shell
gem build zenodo_client.gemspec
Then either install the gem locally:
shell
gem install ./zenodo_client-1.0.0.gem
(for development, run gem install --dev ./zenodo_client-1.0.0.gem to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'zenodo_client', '~> 1.0.0'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/aces/zenodo-client-gem, then add the following in the Gemfile:
gem 'zenodo_client', :git => 'https://github.com/aces/zenodo-client-gem.git'
Include the Ruby code directly
Include the Ruby code directly using -I as follows:
shell
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code: ```ruby
Load the gem
require 'zenodo_client'
Setup authorization
ZenodoClient.configure do |config| # Configure API key authorization: accesstoken config.apikey['accesstoken'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.apikeyprefix['accesstoken'] = 'Bearer' end
api_instance = ZenodoClient::ActionsApi.new
deposit_id = 56 # Integer |
begin #Discard changes in the current editing session. result = apiinstance.discarddeposit(depositid) p result rescue ZenodoClient::ApiError => e puts "Exception when calling ActionsApi->discarddeposit: #{e}" end
```
Documentation for API Endpoints
All URIs are relative to https://sandbox.zenodo.org/api
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- ZenodoClient::ActionsApi | discard_deposit | POST /deposit/depositions/{depositId}/actions/discard | Discard changes in the current editing session. ZenodoClient::ActionsApi | edit_deposit | POST /deposit/depositions/{depositId}/actions/edit | Unlock already submitted deposition for editing. ZenodoClient::ActionsApi | newdepositversion | POST /deposit/depositions/{depositId}/actions/newversion | Create a new version of a deposition. ZenodoClient::ActionsApi | publish_deposit | POST /deposit/depositions/{depositId}/actions/publish | Publish a deposition. Note, once a deposition is published, you can no longer delete it. ZenodoClient::DepositsApi | create_deposit | POST /deposit/depositions | Create a new deposit ZenodoClient::DepositsApi | delete_deposit | DELETE /deposit/depositions/{depositId} | Delete deposit ZenodoClient::DepositsApi | get_deposit | GET /deposit/depositions/{depositId} | Get deposit ZenodoClient::DepositsApi | list_deposits | GET /deposit/depositions | List of deposits ZenodoClient::DepositsApi | put_deposit | PUT /deposit/depositions/{depositId} | Put deposit ZenodoClient::FilesApi | create_file | POST /deposit/depositions/{depositId}/files | Create a new file ZenodoClient::FilesApi | delete_file | DELETE /deposit/depositions/{depositId}/files/{fileId} | Delete an existing deposition file resource. Note, only deposition files for unpublished depositions may be deleted. ZenodoClient::FilesApi | get_file | GET /deposit/depositions/{depositId}/files/{fileId} | Retrieve a single deposition file. ZenodoClient::FilesApi | listfilesfor_deposit | GET /deposit/depositions/{depositId}/files | List of files for deposit ZenodoClient::FilesApi | sort_files | PUT /deposit/depositions/{depositId}/files | Sort the files for a deposit ZenodoClient::FilesApi | update_file | PUT /deposit/depositions/{depositId}/files/{fileId} | Update a deposition file resource. Currently the only use is renaming an already uploaded file. If you want to replace the actual file, please delete the file and upload a new file. ZenodoClient::PreviewApi | list_communities | GET /communities | List of communities ZenodoClient::PreviewApi | list_funders | GET /funders | List of funders ZenodoClient::PreviewApi | list_grants | GET /grants | List of grants ZenodoClient::PreviewApi | list_licenses | GET /licenses | List of licenses ZenodoClient::PreviewApi | list_records | GET /records | List of records
Documentation for Models
- ZenodoClient::Author
- ZenodoClient::Community
- ZenodoClient::Contributor
- ZenodoClient::Deposit
- ZenodoClient::DepositMetadata
- ZenodoClient::DepositionFile
- ZenodoClient::Grant
- ZenodoClient::NestedDepositMetadata
- ZenodoClient::RelatedIdentifier
- ZenodoClient::Subject
Documentation for Authorization
access_token
- Type: API key
- API key parameter name: access_token
- Location: URL query string
Owner
- Name: ACElab
- Login: aces
- Kind: organization
- Location: Montreal, Quebec, Canada
- Website: http://mcin.ca/
- Repositories: 75
- Profile: https://github.com/aces
McGill Centre for Integrative Neuroscience (MCIN) - Alan C. Evans, Ph.D., Principal Investigator
GitHub Events
Total
Last Year
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Pierre Rioux | p****x@m****a | 7 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0