Project

name_drop

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby usage of Mention API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
~> 2.14
~> 10.0
~> 3.0
~> 0.3
~> 0.12

Runtime

 Project Readme

Gem Version Build Status Test Coverage Code Climate Dependency Status Inline docs git.legal

NameDrop

NameDrop provides a ruby interface to the Mention API

Information

Installation

Add this line to your application's Gemfile:

gem 'name_drop'

And then execute:

$ bundle

Or install it yourself as:

$ gem install name_drop

Configuration

Add an initializer file (In rails typically you would name the file: config/initializers/name_drop.rb)

NameDrop.configure do |config|
  config.account_id = ENV['MENTION_API_ACCOUNT_ID']
  config.access_token = ENV['MENTION_API_ACCESS_TOKEN']
end

Usage

Creating a client

client = NameDrop::Client.new

Fetching all objects

all_alerts = client.alerts.all

Fetching single object

alert = client.alert.find(mention_alert_id)

Create object

alert = client.alert.build(new_attributes_hash)
alert.save

Update object

alert = client.alert.find(mention_alert_id)
alert.attributes = updated_attributes_hash
alert.save

Destroy object

shares = client.share.all(alert_id: 1)
shares.each do |share|
  share.destroy
end

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/500friends/name_drop. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.