Class: Figshare::Other
Overview
Misc Figshare API calls that they have classified as Other.
Instance Attribute Summary
Attributes inherited from Base
#api_url, #article_index_file, #auth_token, #base_dir, #hostname, #institute_id
Instance Method Summary collapse
-
#item_types(group_id:) {|Array| ... } ⇒ Object
Fetch item types.
-
#private_account_info(impersonate: nil) {|Hash| ... } ⇒ Object
Get Account information for current user.
-
#private_account_licenses {|Array| ... } ⇒ Object
Get private licenses.
-
#public_categories {|Array| ... } ⇒ Object
Get public categories.
-
#public_file_download(file_id:) {|Data| ... } ⇒ Object
Download a file.
-
#public_licenses {|Array| ... } ⇒ Object
Get public licenses.
-
#search_funding(search_for:) {|Array| ... } ⇒ Object
Search from funding records.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Figshare::Base
Instance Method Details
#item_types(group_id:) {|Array| ... } ⇒ Object
Fetch item types
9 10 11 |
# File 'lib/other.rb', line 9 def item_types(group_id:, &block) get(api_query: 'item_types', args: { 'group_id' => group_id }, &block) end |
#private_account_info(impersonate: nil) {|Hash| ... } ⇒ Object
Get Account information for current user
24 25 26 27 28 |
# File 'lib/other.rb', line 24 def private_account_info(impersonate: nil, &block) args = {} args['impersonate'] = impersonate unless impersonate.nil? get(api_query: 'account', args: args, &block) end |
#private_account_licenses {|Array| ... } ⇒ Object
Get private licenses
48 49 50 |
# File 'lib/other.rb', line 48 def private_account_licenses get(api_query: 'account/licenses', &block) end |
#public_categories {|Array| ... } ⇒ Object
Get public categories
33 34 35 36 |
# File 'lib/other.rb', line 33 def public_categories(&block) args = {} get(api_query: 'categories', &block) end |
#public_file_download(file_id:) {|Data| ... } ⇒ Object
Download a file
56 57 58 |
# File 'lib/other.rb', line 56 def public_file_download(file_id:, &block) get(api_query: "file/download/#{file_id}", &block) end |
#public_licenses {|Array| ... } ⇒ Object
Get public licenses
41 42 43 |
# File 'lib/other.rb', line 41 def public_licenses get(api_query: 'licenses', &block) end |
#search_funding(search_for:) {|Array| ... } ⇒ Object
Search from funding records
17 18 19 |
# File 'lib/other.rb', line 17 def search_funding(search_for:, &block) post(api_query: 'account/funding/search', args: { 'search_for' => search_for }, &block) end |