New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gro_social

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gro_social

  • 0.2.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

GroSocial

Code Climate Test Coverage Build Status

The gro_social gem provides a Ruby interface to the GroSocial REST API. The gem is intended to be lightweight with simple wrappers around the exposed resources.

Installation

Add this line to your application's Gemfile:

gem 'gro_social'

And then execute:

$ bundle

Or install it yourself as:

$ gem install gro_social

Usage

First you need to set your API credentials with the GroSocial::Client.

GroSocial::Client.api_key = 'YOUR_KEY'
GroSocial::Client.api_password = 'SECRET'

You can enable test mode for the client in a similar fashion.

GroSocial::Client.test_mode = true

Once these configuration options are set appropriately you are ready to simply interact with the supported resources.

Users

There are two classes that you will work with in regards to users: GroSocial::Users and GroSocial::User. GroSocial::Users represents the class you will use to locate specific users or iterate over them. GroSocial::Users can be treated like a Hash when it comes to accessing and working with the GroSocial::User records.

Retrieval

Retrieval is keyed to the ID for the user you want to access.

user = GroSocial::Users[1234]   # GroSocial::User

user.id         # '1234'
user.firstname  # 'John'
user.lastname   # 'Doe'
Creation

The << operation is used to both create and update records and its behavior is based on whether the GroSocial::User being pushed in already has an ID value set.

user = GroSocial::User.new(
    firstname:  'John',
    lastname:   'Doe',
    email:      'johndoe@example.com',
    password:   'secret123'
)
user.id         # nil

GroSocial::Users << user

user.id         # '12345'

Subscriptions

TODO: Document the GroSocial::Subscription API

Future-Proofing

TODO: Document how to access resources directly via GroSocial::Client.request

Contributing

  1. Fork it ( https://github.com/[my-github-username]/gro_social/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

FAQs

Package last updated on 09 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc