class Figshare::Other

Misc Figshare API calls that they have classified as Other.

Public Instance Methods

private_account_info() click to toggle source

Get Account information for current user

@yield [Hash] {id, first_name, …} see figshare API docs

# File lib/other.rb, line 18
def private_account_info
  get(api_query: "account", &block)
end
private_account_licenses() click to toggle source

Get private licenses

@yield [Hash] {value, name, url}

# File lib/other.rb, line 39
def private_account_licenses
  get(api_query: "account/licenses", &block)
end
public_categories() click to toggle source

Get public categories

@yield [Hash] {parent_id, id, title}

# File lib/other.rb, line 25
def public_categories
  get(api_query: "categories", &block)
end
public_file_download(file_id:, &block) click to toggle source

Download a file

@param file_id [Integer] Figshare file id @yield [Data] Binary data

# File lib/other.rb, line 47
def public_file_download(file_id:, &block)
  get(api_query: "file/download/#{file_id}", &block)
end
public_licenses() click to toggle source

Get public licenses

@yield [Hash] {value, name, url}

# File lib/other.rb, line 32
def public_licenses
  get(api_query: "licenses", &block)
end
search_funding(search_for:, &block) click to toggle source

Search from funding records

@param search_for [String] string to search for @yield [Hash] {id, title, grant_code, funder_name, is_user_defined, url}

# File lib/other.rb, line 11
def search_funding(search_for:, &block)
  post(api_query: "account/funding/search", args: { "search_for" => search_for }, &block)
end