ully 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7f6a65977caadec7e3fac2534a3e1ded15a8a41d
4
- data.tar.gz: 89665ffb6559be95266ec8365caa5017ca2712e7
3
+ metadata.gz: bb6c5ab1a9276fd038f48fc9cde04a602d920f27
4
+ data.tar.gz: 0122a4de4866b4e5ddd14dab2237a5b864fb3305
5
5
  SHA512:
6
- metadata.gz: 7ff291f70bacda7bf853fdf01df29731198259d5b3420ac1735764925801a90d5a0acb3c22b1f16a6b2f13c41739d7cac3ea1e2b45209fe5972b873ae7ad510a
7
- data.tar.gz: 7be071b9b7b29bd4f4fddeb7ff4f423e928fca43d04f0fab6cded9a267ae54c88132344e26f4224d5d3e9a7b2e251fd2d91874e2f3e5648d13d24eb008bd5b26
6
+ metadata.gz: 99b4558b2f4397ea58f1029cab42f93143625c34f8137a12cdbdd19b6c6d0c84edb7205241513d8b1c419de0b2728ed92318f21f5ce6034d7410413e785efdcb
7
+ data.tar.gz: 016faf0658b977d9271f7b622e069f744f398de3d75eb1a7d2142016b7f46e338ebf6610bec1e1c6b4cb318fde461203fad1669ba459322c53278d43fcec82d8
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ v0.3.0:
2
+ date: 2014-06-1
3
+ changes:
4
+ - Adding support for new Ully API
5
+ - Adding support for new authentication
1
6
  v0.2.0:
2
7
  date: 2014-04-28
3
8
  changes:
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Ully [![Build Status](https://secure.travis-ci.org/enytc/ully-gem.png?branch=master)](http://travis-ci.org/enytc/ully-gem) [![GEM version](https://badge-me.herokuapp.com/api/gem/ully.png)](http://badges.enytc.com/for/gem/ully)
1
+ # Ully [![Build Status](https://secure.travis-ci.org/ullyin/ully-gem.png?branch=master)](http://travis-ci.org/ullyin/ully-gem) [![GEM version](https://badge-me.herokuapp.com/api/gem/ully.png)](http://badges.enytc.com/for/gem/ully)
2
2
 
3
3
  > Ruby Gem for abstracting the use of Ully API
4
4
 
@@ -32,39 +32,6 @@ api = Ully::Client.new("access_token")
32
32
 
33
33
  ## Documentation
34
34
 
35
- #### #login(email, password)
36
-
37
-
38
- **Parameter**: `email`
39
- **Type**: `String`
40
- **Example**: `example@example.com`
41
-
42
-
43
- **Parameter**: `password`
44
- **Type**: `String`
45
- **Example**: `123456test`
46
-
47
-
48
- The `login` method is responsible to login in accounts
49
-
50
- How to use this method
51
-
52
- ```ruby
53
-
54
- api.login("email", "123456test")
55
- ```
56
-
57
- #### #logged_in?
58
-
59
- The `logged_in?` method is responsible to check if user is logged in
60
-
61
- How to use this method
62
-
63
- ```ruby
64
-
65
- api.logged_in?
66
- ```
67
-
68
35
  #### #stats(format=false)
69
36
 
70
37
 
@@ -121,7 +88,7 @@ How to use this method
121
88
  api.status("yaml")
122
89
  ```
123
90
 
124
- #### #me(format=false)
91
+ #### #account(format=false)
125
92
 
126
93
 
127
94
  **Parameter**: `format`
@@ -129,16 +96,16 @@ api.status("yaml")
129
96
  **Example**: `"yaml"`
130
97
 
131
98
 
132
- The `me` method is responsible for showing profile info
99
+ The `account` method is responsible for showing profile info
133
100
 
134
101
  How to use this method
135
102
 
136
103
  ```ruby
137
104
 
138
- api.me("yaml")
105
+ api.account("yaml")
139
106
  ```
140
107
 
141
- #### #update_me(current_password, name="", email="", username="", password="", format=false)
108
+ #### #update_account(current_password, name="", email="", username="", password="", format=false)
142
109
 
143
110
 
144
111
  **Parameter**: `current_password`
@@ -171,30 +138,13 @@ api.me("yaml")
171
138
  **Example**: `yaml`
172
139
 
173
140
 
174
- The `update_me` method is responsible for update profile info
175
-
176
- How to use this method
177
-
178
- ```ruby
179
-
180
- api.update_me("123456test", "myname", "email", "myusername", "123456test", "yaml")
181
- ```
182
-
183
- #### #delete_me(format=false)
184
-
185
-
186
- **Parameter**: `format`
187
- **Type**: `String`
188
- **Example**: `yaml`
189
-
190
-
191
- The `delete_me` method is responsible for delete profile info
141
+ The `update_account` method is responsible for update profile info
192
142
 
193
143
  How to use this method
194
144
 
195
145
  ```ruby
196
146
 
197
- api.delete_me("yaml")
147
+ api.update_account("123456test", "myname", "email", "myusername", "123456test", "yaml")
198
148
  ```
199
149
 
200
150
  #### #collections(format=false)
@@ -435,14 +385,14 @@ api.delete_urls("collection_Slug", "url_id")
435
385
 
436
386
  ## Contributing
437
387
 
438
- 1. Fork it [enytc/ully-gem](https://github.com/enytc/ully-gem/fork)
388
+ 1. Fork it [ullyin/ully-gem](https://github.com/ullyin/ully-gem/fork)
439
389
  2. Create your feature branch (`git checkout -b my-new-feature`)
440
390
  3. Commit your changes (`git commit -am "Add some feature"`)
441
391
  4. Push to the branch (`git push origin my-new-feature`)
442
392
  5. Create new Pull Request
443
393
 
444
394
  ## Support
445
- If you have any problem or suggestion please open an issue [here](https://github.com/enytc/ully-gem/issues).
395
+ If you have any problem or suggestion please open an issue [here](https://github.com/ullyin/ully-gem/issues).
446
396
 
447
397
  ## License
448
398
 
@@ -5,7 +5,7 @@ require "json"
5
5
  require "yaml"
6
6
 
7
7
  # ully-gem
8
- # https://github.com/enytc/ully-gem
8
+ # https://github.com/ullyin/ully-gem
9
9
  #
10
10
  # Copyright (c) 2014, EnyTC Corporation
11
11
  # Licensed under the BSD license.
@@ -32,33 +32,6 @@ module Ully
32
32
  end
33
33
  end
34
34
 
35
- # Login in user account
36
- def login(email, password)
37
- response = self.class.post("/forgot/access_token", :body => {:email => email, :password => password})
38
- json_response = JSON.parse(response.body)
39
- config = json_response["response"]
40
- if config.has_key?("access_token") && config.has_key?("role")
41
- File.open("ullyConfig.yml", "w"){ |f| f << config.to_yaml }
42
- puts "Logged successfully!"
43
- else
44
- puts "Login failed. Try again!"
45
- end
46
- end
47
-
48
- # Check if user is logged
49
- def logged_in?
50
- if File.exist?("ullyConfig.yml")
51
- config = YAML.load_file("ullyConfig.yml")
52
- if config.has_key?("access_token") && config.has_key?("role")
53
- true
54
- else
55
- false
56
- end
57
- else
58
- false
59
- end
60
- end
61
-
62
35
  # Stats of Ully
63
36
  def stats(format=false)
64
37
  response = self.class.get("/stats")
@@ -78,20 +51,14 @@ module Ully
78
51
  end
79
52
 
80
53
  # Show profile info
81
- def me(format=false)
82
- response = self.class.get("/me")
54
+ def account(format=false)
55
+ response = self.class.get("/account")
83
56
  self.class.pretty_response(response, format)
84
57
  end
85
58
 
86
59
  # Update profile info
87
- def update_me(current_password, name="", email="", username="", password="", format=false)
88
- response = self.class.put("/me", :body => {:name => name, :email => email, :username => username, :currentpassword => current_password, :password => password})
89
- self.class.pretty_response(response, format)
90
- end
91
-
92
- # Delete profile info
93
- def delete_me(format=false)
94
- response = self.class.delete("/me")
60
+ def update_account(current_password, name="", email="", username="", password="", format=false)
61
+ response = self.class.put("/account", :body => {:name => name, :email => email, :username => username, :currentpassword => current_password, :password => password})
95
62
  self.class.pretty_response(response, format)
96
63
  end
97
64
 
@@ -1,9 +1,9 @@
1
1
  # ully-gem
2
- # https://github.com/enytc/ully-gem
2
+ # https://github.com/ullyin/ully-gem
3
3
  #
4
4
  # Copyright (c) 2014, EnyTC Corporation
5
5
  # Licensed under the BSD license.
6
6
 
7
7
  module Ully
8
- VERSION = "0.2.0"
8
+ VERSION = "0.3.0"
9
9
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["chris.enytc@gmail.com"]
11
11
  spec.summary = %q{Ruby Gem for abstracting the use of Ully API.}
12
12
  spec.description = %q{Ruby Gem for abstracting the use of Ully API. Manage your favorite links easily and quickly on Ully.}
13
- spec.homepage = "https://github.com/enytc/ully-gem"
13
+ spec.homepage = "https://github.com/ullyin/ully-gem"
14
14
  spec.license = "BSD"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ully
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher EnyTC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-28 00:00:00.000000000 Z
11
+ date: 2014-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -85,7 +85,7 @@ files:
85
85
  - lib/ully/version.rb
86
86
  - spec/client_spec.rb
87
87
  - ully.gemspec
88
- homepage: https://github.com/enytc/ully-gem
88
+ homepage: https://github.com/ullyin/ully-gem
89
89
  licenses:
90
90
  - BSD
91
91
  metadata: {}