Sha256: 9cf09411bd97f14f318f3f0ed6a292df358ca119fe40d8f247ec4d66c3a7b334

Contents?: true

Size: 1.49 KB

Versions: 1

Compression:

Stored size: 1.49 KB

Contents

# Brandspotter

Sign up for your api credentials at: http://brandspotter.herokuapp.com
API is currently invitation only.

## Installation

Add this line to your application's Gemfile:

    gem ‘brandspotter’, '~> 1.0.2'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install brandspotter

## Usage
Create a new initializer: (config/initializers/brandspotter.rb)

    Brandspotter.configure do |config|
      config.user_token = ENV[‘brandspotter_user_token’]
    end



## Methods
    # create a new subscription
    client = Brandspotter::Client.new
    client.create_subscription(hashtag: 'hashtag')

    # list all subscriptions
    client = Brandspotter::Client.new
    client.subscriptions

    # find specific subscription
    client = Brandspotter::Client.new
    client.find_subscription(subscription_id)

    # delete subscription
    client = Brandspotter::Client.new
    client.destroy_subscription(subscription_id)

    # create a new location
    client = Brandspotter::Client.new
    client.create_location(location: 'Amsterdam')

    # create a new location with an instagram_location_id
    client = Brandspotter::Client.new
    client.create_location(instagram_location_id: 514276)

    # list all locations
    client = Brandspotter::Client.new
    client.locations

    # find specific location
    client = Brandspotter::Client.new
    client.find_location(location_id)

    # delete location
    client = Brandspotter::Client.new
    client.destroy_location(location_id)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
brandspotter-1.0.2 README.md