freee-api 0.0.6 → 0.0.7
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +11 -12
- data/lib/freee/api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2a57c83881c0f41c33cb8a82a68a2c5b1603c594
|
|
4
|
+
data.tar.gz: 75f0c50814ae54d826e636d6cdb10c78947064c2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d75dd3b13b060fe91f75ba074f752cb55eb82d97f8974dac9f02647f917ba2c93aae63b5394d78a6128171940b70184274b4d021f05075a2d0565b0d2bd51754
|
|
7
|
+
data.tar.gz: cf2625a085714fb2831e190ae70981cbf93439cee6857ea4b0ad4d4594cf9aca3c6a6a36fa39baa352699f39fbdac3c1fb32f67e517adfe904bb668cf08129a0
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -73,6 +73,17 @@ oauth2.authorize('localhost')
|
|
|
73
73
|
}
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
+
### アクセストークンの取得(2回目以降)
|
|
77
|
+
|
|
78
|
+
有効期限が切れたアクセストークンではリクエストを実行できないため、リフレッシュトークンを利用して新しいアクセストークンを取得します。
|
|
79
|
+
|
|
80
|
+
```ruby
|
|
81
|
+
oauth2 = Freee::Api::Token.new(application_id, secret)
|
|
82
|
+
response = oauth2.refresh_token(access_token, refresh_token, expires_at)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
アクセストークンの有効期限は24時間、リフレッシュトークンの有効期限は無制限です。
|
|
86
|
+
|
|
76
87
|
## このGemでできること
|
|
77
88
|
|
|
78
89
|
このGemでは、Freeeの会計APIのリクエストを行えるようになります。
|
|
@@ -91,18 +102,6 @@ oauth2.authorize('localhost')
|
|
|
91
102
|
不足しているリクエストの実装、ドキュメント生成に関しましては今しばらくお待ちください。
|
|
92
103
|
issueに残していただければ、優先して対応します。
|
|
93
104
|
|
|
94
|
-
### アクセストークンの取得(2回目以降)
|
|
95
|
-
|
|
96
|
-
有効期限が切れたアクセストークンではリクエストを実行できないため、リフレッシュトークンを利用して新しいアクセストークンを取得します。
|
|
97
|
-
|
|
98
|
-
```ruby
|
|
99
|
-
oauth2 = Freee::Api::Token.new(application_id, secret)
|
|
100
|
-
response = oauth2.refresh_token(access_token, refresh_token, expires_at)
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
アクセストークンの有効期限は24時間、リフレッシュトークンの有効期限は無制限です。
|
|
104
|
-
|
|
105
|
-
|
|
106
105
|
## Development
|
|
107
106
|
|
|
108
107
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/freee/api/version.rb
CHANGED