Class: INatGet::Data::Helper::Users Private

Inherits:
INatGet::Data::Helper show all
Includes:
Singleton
Defined in:
lib/inat-get/data/helpers/users.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary

Constants inherited from INatGet::Data::Helper

UUID_PATTERN

Instance Method Summary collapse

Methods inherited from INatGet::Data::Helper

#definitions, field, fields, #manager, #prepare_query, #query_to_sequel, #validate_query!

Instance Method Details

#endpointObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



12
# File 'lib/inat-get/data/helpers/users.rb', line 12

def endpoint() = :users

#query_to_api(**query) ⇒ Array<Hash>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Array<Hash>)


18
19
20
21
22
# File 'lib/inat-get/data/helpers/users.rb', line 18

def query_to_api **query
  endpoint = self.manager.endpoint
  values = (query[:id] || []).to_set + (query[:login] || []).to_set
  values.map { |v| { endpoint: "#{ endpoint }/#{ v }", query: {} } }
end