https://github.com/simnalamburt/kollus-ruby
:package: kollus API written in ruby
https://github.com/simnalamburt/kollus-ruby
kollus ruby
Last synced: 11 months ago
JSON representation
:package: kollus API written in ruby
- Host: GitHub
- URL: https://github.com/simnalamburt/kollus-ruby
- Owner: simnalamburt
- License: other
- Created: 2015-10-02T17:34:14.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-01-09T15:03:24.000Z (over 9 years ago)
- Last Synced: 2024-09-22T21:18:16.575Z (over 1 year ago)
- Topics: kollus, ruby
- Language: Ruby
- Homepage:
- Size: 38.1 KB
- Stars: 5
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
kollus-ruby [![version][]][rubygems]
========
[kollus] API written in **ruby**. [Click to see a sample][sample]
```ruby
require 'kollus'
kollus = Kollus.new 'catenoid-sample', '1234567890abcdef' # Use your own one
# 동영상 플레이하기
sample = kollus.media '7MscjbVl', 'client_user_id'
sample.url # http://v.kr.kollus.co...61|V1.0
sample.download # http://v.kr.kollus.co...61|V1.0&download
sample.token # D9C34B694FF4728E430E5E0..
# 동영상 업로드
upload = kollus.upload
upload.url # http://upload.kr.kollus.com/20150101-abcd1234
upload.key # 20150101-abcd1234
upload.expires_at # 2015-01-01 06:00:00 +0900
```
Getting Started
--------
Install the gem with:
```bash
gem install kollus
```
Or you can add it to your Gemfile with:
```ruby
gem 'kollus'
```
You can simply drop this gem into your ruby web application.
```ruby
## Controller
# Use your own one
account_key = 'mycompany-key'
api_token = 'abcdef0123456789'
kollus = Kollus.new account_key, api_token
@media1 = kollus.media '7MscjbVl', 'user-1'
@media2 = kollus.media 'Kcrbjc2S', 'user-2'
@upload = kollus.upload
```
```erb
<%# View %>
```
Please look at the [sample application][sample] for the working example of kollus-ruby.
#### How to run sample application
See [kollus-ruby-sample][sample]
--------
*kollus-ruby* is primarily distributed under the terms of both the [MIT license]
and the [Apache License (Version 2.0)]. See [COPYRIGHT] for details.
[version]: https://img.shields.io/gem/v/kollus.svg
[rubygems]: https://rubygems.org/gems/kollus
[kollus]: http://kollus.com
[sample]: https://github.com/simnalamburt/kollus-ruby-sample
[MIT license]: LICENSE-MIT
[Apache License (Version 2.0)]: LICENSE-APACHE
[COPYRIGHT]: COPYRIGHT