getpocket 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +19 -0
- data/README.md +51 -0
- metadata +103 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZDBjZWJhYjViMGZiMGU0OGVjYWFhNmM3ZjcxNmQyMzJkMTYyMzBhNA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NmJlYzUwZWQxNTMwNjYwZjg3ZTdkOWM3OGRlMDdkMzQ2YzJkZmYwNA==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MWNlNzI2ZWRhODc1MDYxNjM5Y2ViODIwNGI0M2NiOTk4N2ViNWMxODNlZWJl
|
10
|
+
MDQyY2FjZmU1NDEzYzIxYjAxNTMyNWIwM2Q0ZjFjNjI5OWRkZTZiNjZlZWYx
|
11
|
+
MTYwZjY2NzVmOTY4ZDQ5OGI0MWJhNWQwZDQxNTIxNjU1ZjQyMjc=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MGY0YjMwYThlYTgwZGE5ZjFkNjZiY2ViZjdmYzk0N2RmZTA3YzlkNzliZTRh
|
14
|
+
ODk0MTMwODc3MDA4YWM4ZmQyYTQyY2FkYzNhYmQ0MjgzYzY0ZjNmN2I5YzY5
|
15
|
+
NGMyMTJiMThiNjE2NTA4MzExNjU4NTYxZjI1OGQ2NTkzY2JlYmU=
|
data/.gitignore
ADDED
data/README.md
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# PocketApi
|
2
|
+
Rubygem for Pocket (getpocket.com) API, formerly ReadItLater.
|
3
|
+
|
4
|
+
## Installation
|
5
|
+
|
6
|
+
Add this line to your application's Gemfile:
|
7
|
+
|
8
|
+
gem 'pocket_api'
|
9
|
+
|
10
|
+
And then execute:
|
11
|
+
|
12
|
+
$ bundle
|
13
|
+
|
14
|
+
Or install it yourself as:
|
15
|
+
|
16
|
+
$ gem install pocket_api
|
17
|
+
|
18
|
+
## Usage
|
19
|
+
|
20
|
+
1. Get an API Key from http://getpocket.com/developer/ and attain and access_token
|
21
|
+
2. Setup PocketApi credentials with:
|
22
|
+
```
|
23
|
+
PocketApi.configure(:client_key=> API_KEY, :access_token => ACCESS_TOKEN)
|
24
|
+
```
|
25
|
+
3. Call API with corresponding API methods (retrieve, add, modify)
|
26
|
+
```
|
27
|
+
PocketApi.retrieve({:state => "unread"})
|
28
|
+
PocketApi.add("http://example.com", {:title => "Test add"})
|
29
|
+
PocketApi.modify("archive", {:item_id => "123456"})
|
30
|
+
```
|
31
|
+
|
32
|
+
There's also some OAuth helper methods in PocketApi::Connection to generate Request Tokens, Authorize URLs, and Access Tokens.
|
33
|
+
Here's a possible workflow:
|
34
|
+
1. Generate Authorize URL for user to log in:
|
35
|
+
```
|
36
|
+
PocketApi::Connection.client_key = API_KEY
|
37
|
+
PocketApi::Connection.generate_authorize_url("https://myserver/authorize_callback", "https://myserver/denied_authorize")
|
38
|
+
```
|
39
|
+
2. Once user returns, generate access token from previous request_token
|
40
|
+
```
|
41
|
+
PocketApi::Connection.client_key = API_KEY
|
42
|
+
PocketApi::Connection.generate_access_token
|
43
|
+
```
|
44
|
+
|
45
|
+
## Contributing
|
46
|
+
|
47
|
+
1. Fork it
|
48
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
49
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
50
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
51
|
+
5. Create new Pull Request
|
metadata
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: getpocket
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alex Chee
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-05-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: httparty
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: API Wrapper for Pocket (was Read It Later)
|
70
|
+
email:
|
71
|
+
- alexchee11@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- .gitignore
|
77
|
+
- README.md
|
78
|
+
homepage: https://github.com/alexchee/pocket_api
|
79
|
+
licenses:
|
80
|
+
- MIT
|
81
|
+
metadata: {}
|
82
|
+
post_install_message:
|
83
|
+
rdoc_options: []
|
84
|
+
require_paths:
|
85
|
+
- lib
|
86
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ! '>='
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
requirements: []
|
97
|
+
rubyforge_project:
|
98
|
+
rubygems_version: 2.0.3
|
99
|
+
signing_key:
|
100
|
+
specification_version: 4
|
101
|
+
summary: API Wrapper for Pocket (was Read It Later)
|
102
|
+
test_files: []
|
103
|
+
has_rdoc:
|