update readme. remove redundant code.
This commit is contained in:
parent
21c3057b35
commit
2d171a4170
20
README.md
20
README.md
|
@ -60,10 +60,24 @@ All endpoints are accessed via namespaced Api resource. Example: `client.users.c
|
|||
|
||||
#### Users:
|
||||
|
||||
1. `#me(**opts)`
|
||||
- alias: `get`, `show`
|
||||
1. `#create(payload, **opts)`
|
||||
1. `GET #me`
|
||||
1. `POST #create(payload)`
|
||||
|
||||
#### Api Keys:
|
||||
|
||||
1. `GET #current`
|
||||
1. `POST #create(payload)`
|
||||
1. `DELETE #revoke(key)`
|
||||
1. `DELETE #revoke!`
|
||||
|
||||
### Request helpers
|
||||
|
||||
#### Api Keys:
|
||||
|
||||
##### Authorize
|
||||
|
||||
1. `GET #html(permissions: [], application_name:, strict: true, selective_stores: false)`
|
||||
1. `#link(permissions: [], application_name:, strict: true, selective_stores: false)`
|
||||
|
||||
### Environment Variables
|
||||
|
||||
|
|
|
@ -6,20 +6,6 @@ module BtcPay
|
|||
class ApiKeys < Base
|
||||
PATH = '/api-keys'
|
||||
|
||||
# @see https://docs.btcpayserver.org/API/Greenfield/v1/#tag/Authorization/paths/~1api-keys~1authorize/get
|
||||
def authorize(permissions: [], application_name:, strict: true, selective_stores: false, **opts)
|
||||
opts.merge!(
|
||||
{
|
||||
permissions: Array(permissions),
|
||||
applicationName: application_name,
|
||||
strict: strict,
|
||||
selectiveStores: selective_stores
|
||||
}
|
||||
)
|
||||
|
||||
client.get('/api-keys/authorize', options: opts, include_api_path: false)
|
||||
end
|
||||
|
||||
# @see https://docs.btcpayserver.org/API/Greenfield/v1/#tag/API-Keys/paths/~1api~1v1~1api-keys~1current/get
|
||||
def current(**opts)
|
||||
client.get(path('current'), options: opts)
|
||||
|
|
Loading…
Reference in New Issue