Records:
-
find record by ID
-
update record by ID
-
delete record by ID
-
edit record object fields
-
update record using object
-
delete record using object
-
upload record form ftp
-
upload record from http
-
get record visitors (uniq) or views statistics
-
get all records visitors (uniq) or views statistics
Translations:
-
get translations list
-
find translation by ID
-
update translation by ID
-
delete translation by ID
-
edit translation object fields
-
update translation using object
-
delete translation using object
-
get translation statistics
Filters:
-
find filter by ID
-
see all filter records
gem install eagleplatform
require 'eagleplatform'
Setup
Eagleplatform.setup('YOUR_ACCOUNT','YOUR_TOKEN')
Upload record from ftp
record_params = { name: 'SomeRecord', description: 'Example Video' } ftp_params = { server: 'ftp.example_server.com',file_path: '/videos/my_video.mpg',username: 'ftp_username', password: 'ftp_passowrd' } Eagleplatform::Record.upload_form_ftp( record: record_params, ftp: ftp_params)
Upload record from http
record_params = { name: 'SomeRecord', description: 'Example Video' } Eagleplatform::Record.upload_form_http( record: record_params, upload_url: 'http://exapmle.com/video.mpg')
Puts translations start time
Eagleplatform::Translation.list.each { |t| puts t.starts._at }
Update translation name with ID
Eagleplatform::Record.update(id: 12, name: 'Hello World')
Get Record object and update description
r = Eagleplatform::Record.find(1234) r.description = 'Foo' r.update
Delete record with ID
Eagleplatform::Record.delete(12)
Library documentation: rubydoc.info/gems/eagleplatform/0.0.1/frames
API documentation: dev.eagleplatform.com
Eagleplatform: www.eagleplatform.com