Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Arie/logs_tf
Gem for the logs.tf API
https://github.com/Arie/logs_tf
Last synced: about 1 month ago
JSON representation
Gem for the logs.tf API
- Host: GitHub
- URL: https://github.com/Arie/logs_tf
- Owner: Arie
- Created: 2013-02-10T09:39:11.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2022-02-17T23:26:36.000Z (almost 3 years ago)
- Last Synced: 2024-11-09T15:12:05.118Z (about 1 month ago)
- Language: Ruby
- Size: 99.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-tf2-devs - Arie/logs_tf - ruby - api wrapper for logs.tf (Table of contents / Logs related)
README
# Logs.tf interface [![Build Status](https://secure.travis-ci.org/Arie/logs_tf.png)](http://travis-ci.org/Arie/logs_tf) [![Dependencies](https://gemnasium.com/Arie/logs_tf.png)](https://gemnasium.com/Arie/logs_tf.png) [![Code Climate](https://codeclimate.com/github/Arie/logs_tf.png)](https://codeclimate.com/github/Arie/logs_tf) [![Coverage Status](https://coveralls.io/repos/github/Arie/logs_tf/badge.svg?branch=master)](https://coveralls.io/r/Arie/logs_tf)
A gem for the logs.tf API
## Usage
- Get an account and API key on [logs.tf](http://logs.tf)
- Set a constant called LogsTF:API_KEY or use it as an argument in the next step
- Create a log object.```ruby
log = LogsTF::Log.new(File.open('logfile.log'), 'map_name', 'title', 'api_key')
```- Create the upload object:
```ruby
upload = LogsTF::Upload.new(log)
```- If there something wrong an error will be raised which you can rescue and inspect the message of:
```ruby
begin
upload.send
rescue Exception => e
puts "The error is #{e.message}"
end
```- If everthing's alright, you can get the URL to the uploaded log:
```ruby
upload.send
upload.url
```