Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/12joan/not-analytics-ruby-client
A Ruby client for not Analytics
https://github.com/12joan/not-analytics-ruby-client
Last synced: 23 days ago
JSON representation
A Ruby client for not Analytics
- Host: GitHub
- URL: https://github.com/12joan/not-analytics-ruby-client
- Owner: 12joan
- License: unlicense
- Created: 2021-03-25T19:10:11.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-18T09:57:28.000Z (6 months ago)
- Last Synced: 2024-10-26T17:22:04.475Z (2 months ago)
- Language: Ruby
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# not Analytics Ruby Client
A Ruby client for [not Analytics](https://github.com/12joan/not-analytics).
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'not-analytics-client', github: '12joan/not-analytics-ruby-client', branch: 'main'
```And then execute:
$ bundle install
## Usage
Instantiate a new Hit object for a given app ID.
```ruby
hit = NotAnalyticsClient::Hit.new(
app_id: app_id,
event: '/some/path', # Optional
key: app_key, # Optional
)
```Send the Hit to a not Analytics server.
```ruby
hit.post!(not_analytics_url: 'https://hit.example.com/')
# => #
```Or output the JSON payload.
```ruby
hit.payload
# => "{\"hit\":{\"app_id\":"...
```