Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fizvlad/vkdonate-rb
Small Ruby Gem to interact with vkdonate.ru API
https://github.com/fizvlad/vkdonate-rb
api app donate donations vk vkontakte
Last synced: 10 days ago
JSON representation
Small Ruby Gem to interact with vkdonate.ru API
- Host: GitHub
- URL: https://github.com/fizvlad/vkdonate-rb
- Owner: fizvlad
- License: mit
- Created: 2019-09-21T15:08:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-16T18:56:47.000Z (8 months ago)
- Last Synced: 2024-12-16T06:16:33.206Z (about 1 month ago)
- Topics: api, app, donate, donations, vk, vkontakte
- Language: Ruby
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vkdonate
This is small non-official gem which provides interface to interact with [vkdonate.ru API](https://vkdonate.ru/help#api).
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'vkdonate'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install vkdonate
## Usage
You can check documentation [here](https://www.rubydoc.info/gems/vkdonate/).
To interact with API you are to initialize client firstly:
```ruby
client = Vkdonate::Client.new("API KEY GOES HERE")
```After that you can call method `Client#donates` which returnes array of `Donate` objects:
```ruby
donates = client.donates(count: 10, order: :asc)
Vkdonate::Donate === donates[0] # => true
puts donates
=begin
Output:
Donation #1219946 by @157230821 for 1RUR (at 2019-09-22T01:35:47+03:00)
Donation #1219943 by @157230821 for 1RUR (at 2019-09-22T01:34:59+03:00)
Donation #1219941 by @157230821 for 1RUR (at 2019-09-22T01:33:37+03:00)
=end
```