Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/keallar/stosp
Client library for 100sp API. Supports all proposed endpoints.
https://github.com/keallar/stosp
Last synced: 10 days ago
JSON representation
Client library for 100sp API. Supports all proposed endpoints.
- Host: GitHub
- URL: https://github.com/keallar/stosp
- Owner: Keallar
- License: mit
- Created: 2023-06-10T10:49:07.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-23T15:41:41.000Z (about 1 year ago)
- Last Synced: 2024-04-24T12:24:47.106Z (9 months ago)
- Language: Ruby
- Homepage: https://github.com/Keallar/stosp
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Stosp
## Introduction
Client library for [100sp](https://www.100sp.ru/) API. Supports all proposed endpoints.
## Installation
Add following line to your Gemfile:
```
# Gemfile
gem 'stosp'
```
Or install it system-wide:
```
$ gem install stosp
```
## Usage
First, init client with token:
```
token = 'YOUR_ACCESS_TOKEN'
client = Stosp::Client.new(access_token: token)
```
And than talk API with options (if required):
```
client.purchase_export_meta(purchase)
```
### List of all methods
Check the [official API docs](https://www.100sp.ru/help?category-id=59) for more information and available ```options``` of methods
```
available_distributors -> GET
calculate(options) -> POST
check_orders(mega_order_id, orders = []) -> POST
create(options) -> POST
export_full_report -> GET
export_purchases_list -> GET
import(options) -> POST
process_orders(pid, options = {}) -> GET
purchase_export(options = {}) -> GET
purchase_export_meta(purchase) -> GET
sticker_print(mega_order_ids, options = {}) -> GET
```
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/Keallar/stosp.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).