Class: Puree::REST::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/puree/rest/client.rb

Overview

Requests for all resources

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Client

Returns a new instance of Client.

Parameters:

  • config (Hash)

Options Hash (config):

  • :url (String)

    URL of the Pure host

  • :username (String)

    Username of the Pure host account

  • :password (String)

    Password of the Pure host account

  • :api_key (String)

    API key of the Pure host account

  • :http_read_timeout (Float)

    Read timeout in seconds

  • :http_write_timeout (Float)

    Write timeout in seconds

  • :http_connection_timeout (Float)

    Connection timeout in seconds



10
11
12
# File 'lib/puree/rest/client.rb', line 10

def initialize(config)
  @config = config
end

Instance Method Details

#activitiesPuree::REST::Activity



15
16
17
# File 'lib/puree/rest/client.rb', line 15

def activities
  Puree::REST::Activity.new @config
end

#applicationsPuree::REST::Application



20
21
22
# File 'lib/puree/rest/client.rb', line 20

def applications
  Puree::REST::Application.new @config
end

#classification_schemesPuree::REST::ClassificationScheme



25
26
27
# File 'lib/puree/rest/client.rb', line 25

def classification_schemes
  Puree::REST::ClassificationScheme.new @config
end

#curricula_vitaePuree::REST::CurriculaVitae



30
31
32
# File 'lib/puree/rest/client.rb', line 30

def curricula_vitae
  Puree::REST::CurriculaVitae.new @config
end

#datasetsPuree::REST::Dataset



35
36
37
# File 'lib/puree/rest/client.rb', line 35

def datasets
  Puree::REST::Dataset.new @config
end

#equipmentsPuree::REST::Equipment



40
41
42
# File 'lib/puree/rest/client.rb', line 40

def equipments
  Puree::REST::Equipment.new @config
end

#eventsPuree::REST::Event

Returns:



45
46
47
# File 'lib/puree/rest/client.rb', line 45

def events
  Puree::REST::Event.new @config
end

#external_organisationsPuree::REST::ExternalOrganisation



50
51
52
# File 'lib/puree/rest/client.rb', line 50

def external_organisations
  Puree::REST::ExternalOrganisation.new @config
end

#external_personsPuree::REST::ExternalPerson



55
56
57
# File 'lib/puree/rest/client.rb', line 55

def external_persons
  Puree::REST::ExternalPerson.new @config
end

#impactsPuree::REST::Impact

Returns:



60
61
62
# File 'lib/puree/rest/client.rb', line 60

def impacts
  Puree::REST::Impact.new @config
end

#journalsPuree::REST::Journal



65
66
67
# File 'lib/puree/rest/client.rb', line 65

def journals
  Puree::REST::Journal.new @config
end

#organisational_unitsPuree::REST::OrganisationalUnit



70
71
72
# File 'lib/puree/rest/client.rb', line 70

def organisational_units
  Puree::REST::OrganisationalUnit.new @config
end

#personsPuree::REST::Person

Returns:



75
76
77
# File 'lib/puree/rest/client.rb', line 75

def persons
  Puree::REST::Person.new @config
end

#press_mediaPuree::REST::PressMedia



80
81
82
# File 'lib/puree/rest/client.rb', line 80

def press_media
  Puree::REST::PressMedia.new @config
end

#prizesPuree::REST::Prize

Returns:



85
86
87
# File 'lib/puree/rest/client.rb', line 85

def prizes
  Puree::REST::Prize.new @config
end

#projectsPuree::REST::Project



90
91
92
# File 'lib/puree/rest/client.rb', line 90

def projects
  Puree::REST::Project.new @config
end

#publishersPuree::REST::Publisher



95
96
97
# File 'lib/puree/rest/client.rb', line 95

def publishers
  Puree::REST::Publisher.new @config
end

#research_outputsPuree::REST::ResearchOutput



100
101
102
# File 'lib/puree/rest/client.rb', line 100

def research_outputs
  Puree::REST::ResearchOutput.new @config
end