chatspry 0.0.1.pre3 → 0.0.1.pre4
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.
- data/README.md +52 -13
- data/lib/chatspry/client.rb +1 -1
- data/lib/chatspry/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -1,29 +1,68 @@
|
|
1
1
|
# Chatspry
|
2
2
|
|
3
|
-
|
3
|
+
API wrapper for Chatspry to be used from any ruby **1.9**, **2.0**
|
4
|
+
or **2.1** application. Dependent on the following libraries:
|
5
|
+
|
6
|
+
- [Faraday](https://github.com/lostisland/faraday)
|
7
|
+
- [Hashie](https://github.com/intridea/hashie)
|
4
8
|
|
5
9
|
## Installation
|
6
10
|
|
7
|
-
Add this line to your
|
11
|
+
Add this line to your project Gemfile:
|
8
12
|
|
9
|
-
|
13
|
+
```ruby
|
14
|
+
gem "chatspry", "~> 0.0.1.pre3"
|
15
|
+
```
|
10
16
|
|
11
|
-
|
17
|
+
Then execute this in a command line from your project directory:
|
12
18
|
|
13
|
-
|
19
|
+
```bash
|
20
|
+
$ bundle
|
21
|
+
```
|
14
22
|
|
15
|
-
Or install it
|
23
|
+
Or install it on it's own with RubyGems:
|
16
24
|
|
17
|
-
|
25
|
+
```bash
|
26
|
+
$ gem install chatspry
|
27
|
+
```
|
18
28
|
|
19
29
|
## Usage
|
20
30
|
|
21
|
-
|
31
|
+
### Basic usage
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
require "chatspry"
|
35
|
+
|
36
|
+
client = Chatspry::Client.new
|
37
|
+
client.access_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
38
|
+
|
39
|
+
user = client.get("/v1/user")
|
40
|
+
# => { "user" => { "id"=>"...", "handle"=>"zeeraw", "name"=>"Philip Vieira", "updated_at"=>1403036249, "created_at"=>1403036249 } }
|
41
|
+
|
42
|
+
user.handle
|
43
|
+
# => "zeeraw"
|
44
|
+
```
|
22
45
|
|
23
46
|
## Contributing
|
24
47
|
|
25
|
-
1. Fork it
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
48
|
+
#### 1. Fork it at https://github.com/chatspry/chatspry.rb/fork
|
49
|
+
|
50
|
+
#### 2. Create your feature branch nested under `feature/`
|
51
|
+
|
52
|
+
```bash
|
53
|
+
$ git checkout -b feature/my-important-change
|
54
|
+
```
|
55
|
+
|
56
|
+
#### 3. Commit your changes
|
57
|
+
|
58
|
+
```bash
|
59
|
+
$ git commit -am 'The gem now behaves this way, because reasons'
|
60
|
+
```
|
61
|
+
|
62
|
+
#### 4. Push to the branch
|
63
|
+
|
64
|
+
```bash
|
65
|
+
$ git push origin feature/my-important-change
|
66
|
+
```
|
67
|
+
|
68
|
+
#### 5. Create a new Pull Request
|
data/lib/chatspry/client.rb
CHANGED
@@ -25,7 +25,7 @@ module Chatspry
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def inspect
|
28
|
-
string = ["<Chatspry::Client
|
28
|
+
string = ["<Chatspry::Client"]
|
29
29
|
string << "identifier: #{ @identifier }" if @identifier
|
30
30
|
string << "passphrase: #{ "*******" }" if @passphrase
|
31
31
|
string << "access_token: #{'*'*56}#{@access_token[56..-1] }" if @access_token
|
data/lib/chatspry/version.rb
CHANGED