instapi 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/bookmark.rb +1 -1
- data/examples/get_unread.rb +1 -1
- data/lib/instapi.rb +6 -1
- data/lib/instapi/version.rb +1 -1
- metadata +1 -1
data/examples/bookmark.rb
CHANGED
data/examples/get_unread.rb
CHANGED
data/lib/instapi.rb
CHANGED
@@ -8,15 +8,20 @@ class Instapi
|
|
8
8
|
|
9
9
|
def initialize(username, password)
|
10
10
|
@username, @password = username, password
|
11
|
+
self
|
11
12
|
end
|
12
13
|
|
13
14
|
def client
|
14
15
|
return @client if @client
|
15
16
|
@client = HTTPClient.new
|
16
|
-
@client.post("#{BASE_URL}/user/login", :username => username, :password => password)
|
17
17
|
@client
|
18
18
|
end
|
19
19
|
|
20
|
+
def login!
|
21
|
+
client.post("#{BASE_URL}/user/login", :username => username, :password => password)
|
22
|
+
self
|
23
|
+
end
|
24
|
+
|
20
25
|
def add(url, options = {})
|
21
26
|
get('/api/add', {:url => url, :username => username, :password => password}.merge(options))
|
22
27
|
end
|
data/lib/instapi/version.rb
CHANGED