Giter Club home page Giter Club logo

hull-ruby's Introduction

Hull Ruby client

Installation

Add this line to your application's Gemfile:

gem 'hullio'

And then execute:

$ bundle

Or install it yourself as:

$ gem install hullio

Usage

Configuration

Hull.configure do |c|
  c.app_id = "5b472f6b35632446d600181c"
  c.app_secret = "co891467hro287h4o2h4o2i34785o23"
  c.organization = "example.hullapp.io"
end

In Rails, you can include this in an initializer.

Making API calls as as a User

# From its user ID
Hull.as('51fa7afd09e50d11f1000002').get('me')


# From a User in your database, with lazy creation (Check the Identity resolution section here https://www.hull.io/docs/data_lifecycle/ingest/)
identity = { external_id:'1234', email:'[email protected]' }
Hull.as(identity).get('me')

Capturing user Traits and track Events

For users

user = Hull.as_user(email: '[email protected]')
user.traits({ name: 'Bob', age: 21 })
user.track('Visited Page', { url: 'http://www.hull.io' })

For accounts

account = Hull.as_account(domain: 'hull.op')
user.traits({ name: 'Hull inc' })

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

hull-ruby's People

Contributors

mathieuravaux avatar oliger avatar sbellity avatar unity avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hull-ruby's Issues

How to get the current logged in user details?

Hi,
I have logged in with hull.js. And i am suing hull-ruby to perform other functionalities. I want to get the logged in user details through hull-ruby. Please guide me to get that.

How to get all the logged in user in my application?

I tried with following command.

@suggested_friends=Hull.get('app/users')

It has given a list of users, but in that my(current logged in) users details is missing.

How to get all the users whom are logged in our application?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.