proz 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7436134475d4ba3252d82a038d364d72f9b9b721
4
- data.tar.gz: 567a43ef29460f31f0f3d88d3306547ade11ebc0
3
+ metadata.gz: dcd98de33b8e6c18e2bf3779377e34548af84bfe
4
+ data.tar.gz: b9146a8af8d71d227ebe6f411bc6117737e1cbcc
5
5
  SHA512:
6
- metadata.gz: bdaab483bf3d52090dfce8c0a626eee92a9bd6c9d6aced42efd923abe3db418601fc3c409a4ef5dc2e8b4658026330185cc4329497087f336d069236af3ee9ea
7
- data.tar.gz: a8a1050995b696699cf12bc8e11f9613abdd8a17b84df3bf9ecf093eab9be3283b68006e4ee8de3a0737f77d88790b0ae7295f609bdc5a2b5ced42cc6373e861
6
+ metadata.gz: 813f8384b50dd67232919cb95b9157d541e8d45ffd99ed572923b23103e1ef9b5c352453603fc79822f1ae29d0e8b64f03152bc7f0ac2e397d6bd54f0b75d03d
7
+ data.tar.gz: 3032856caa3fbc4057a4df2c2753d8609b9112b88d5e378e4cfd742dc45420e15a6351f92ad0a03237d9196ff52411806e78f48ca7a9875bc72762e28a067888
data/README.md CHANGED
@@ -80,8 +80,8 @@ To Setup Your App with ProZ OAuth2:
80
80
 
81
81
  *controller*
82
82
  ```ruby
83
- proz = Proz::OAuth.new(client_id: 'yourClientID', client_secret: 'yourClientSecret', redirect_uri: 'yourRedirectURI')
84
- @oauth_link = proz.link
83
+ proz_oauth = Proz::OAuth.new(client_id: 'yourClientID', client_secret: 'yourClientSecret', redirect_uri: 'yourRedirectURI')
84
+ @oauth_link = proz_oauth.link
85
85
  ```
86
86
 
87
87
  *view*
@@ -91,7 +91,7 @@ To Setup Your App with ProZ OAuth2:
91
91
 
92
92
  5. Exchange your authorization code for an access token
93
93
  ```ruby
94
- token = proz.exchange_code_for_token(params[:code])
94
+ token = proz_oauth.exchange_code_for_token(params[:code])
95
95
  ```
96
96
 
97
97
  6. Save the token and refresh token (*optional*)
@@ -101,7 +101,7 @@ To Setup Your App with ProZ OAuth2:
101
101
 
102
102
  7. Retrieve the user's profile info
103
103
  ```ruby
104
- proz = Proz::Profile.new(token: token)
104
+ proz = Proz::Profile.new(token: token['access_token'])
105
105
  proz.uuid
106
106
  # => '7bbfdd74-a2a4-484f-8dbc-215a67026ce1'
107
107
 
data/lib/proz/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Proz
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -0,0 +1,18 @@
1
+ require 'httparty'
2
+
3
+ module Proz
4
+ class WiwoEntry
5
+ include HTTParty
6
+ base_uri "https://api.proz.com/v2"
7
+ attr_reader :token
8
+ def initialize(token:)
9
+ @token = token
10
+ end
11
+
12
+ def post
13
+ self.class.post("/workstatus",
14
+ body: { message: 'This is a test from TMT' }.to_json,
15
+ headers: { 'Authorization' => "Bearer #{token}" } )
16
+ end
17
+ end
18
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-05 00:00:00.000000000 Z
11
+ date: 2016-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -129,6 +129,7 @@ files:
129
129
  - lib/proz/oauth.rb
130
130
  - lib/proz/profile.rb
131
131
  - lib/proz/version.rb
132
+ - lib/proz/wiwo_entry.rb
132
133
  - proz.gemspec
133
134
  - spec/fixtures/vcr_cassettes/exchange_code_for_token.yml
134
135
  - spec/fixtures/vcr_cassettes/exchange_code_for_token_invalid_code.yml