giddy 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
+ docs
1
2
  pkg
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- giddy (0.1.2)
4
+ giddy (0.1.3)
5
5
  httparty (>= 0.11.0)
6
6
  json (>= 1.8.0)
7
7
 
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Giddy
2
- Giddy is a ruby gem for interacting with the Getty API.
2
+ Giddy is a Ruby gem for interacting with the {Getty Images Connect API}[https://github.com/gettyimages/connect].
3
3
 
4
4
  # Installation
5
5
 
data/lib/giddy/client.rb CHANGED
@@ -4,6 +4,10 @@ module Giddy
4
4
  @mediator = Mediator.new(username, password, token, secure_token)
5
5
  end
6
6
 
7
+ def set_system_credentials(system_id, system_password)
8
+ @mediator.set_system_credentials system_id, system_password
9
+ end
10
+
7
11
  def search(attrs)
8
12
  if attrs.has_key?(:image_id) and attrs.keys.length == 1
9
13
  return Search.new(@mediator).get_image_details(attrs[:image_id]).first
@@ -8,12 +8,19 @@ module Giddy
8
8
  @password = password
9
9
  @token = token
10
10
  @secure_token = secure_token
11
+ @system_id = nil
12
+ @system_password = nil
13
+ end
14
+
15
+ def set_system_credentials(system_id, system_password)
16
+ @system_id = system_id
17
+ @system_password = system_password
11
18
  end
12
19
 
13
20
  def create_session
14
21
  data = {
15
- :SystemId => Giddy.config.system_id,
16
- :SystemPassword => Giddy.config.system_password,
22
+ :SystemId => @system_id || Giddy.config.system_id,
23
+ :SystemPassword => @system_password || Giddy.config.system_password,
17
24
  :UserName => @username,
18
25
  :UserPassword => @password
19
26
  }
data/lib/giddy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Giddy
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: giddy
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.2
5
+ version: 0.1.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Brian Muller
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2013-10-14 00:00:00 Z
13
+ date: 2013-10-20 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -97,7 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
97
  requirements:
98
98
  - - ">="
99
99
  - !ruby/object:Gem::Version
100
- hash: 1178430877288164185
100
+ hash: 2656067166173040371
101
101
  segments:
102
102
  - 0
103
103
  version: "0"
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
- hash: 1178430877288164185
109
+ hash: 2656067166173040371
110
110
  segments:
111
111
  - 0
112
112
  version: "0"