Giter Club home page Giter Club logo

btcjam-client's Introduction

BTCJam API Client Demo

This app is an example of a BTCJam API OAuth2 client. It uses rails, devise and omniauth gems. OAuth2 strategy is build on top of abstract OAuth2 strategy for OmniAuth

This app is live here.

About the BTCJam API

For more information about the API check here, this project is hosted here.

The user info returned currently is:

info['alias']
info['country']
info['positive_count_reputation']
info['negative_count_reputation]
info['positive_percentage_reputation']
info['can_borrow']
info['can_trade']
info['btcjam_score']
info['bitcointalk_account_verified']
info['address_verified']
info['identity_verified']
info['phone_verified']
info['facebook_connected']
info['facebook_friend_count']
info['linkedin_connected']
info['ebay_connected']
info['ebay_account_date']
info['ebay_feedback_score']
info['paypal_verified_account_connected']
info['paypal_account_date']
info['repaid_loans_count']
info['repaid_loans_amount']
info['late_loans_count']
info['open_credit_lines_count']
info['open_credit_lines_amount']
info['made_late_payments_count']
info['balance']

Installation & Configuration

If you want to run the application by yourself here are the steps for you.

First you need to clone the repository from GitHub

git clone git://github.com/btcjam/btcjam-client.git

Install all the gems

bundle install

And migrate the databse

rake db:migrate

At this point the application should be ready to run, but it won't communicate correctly with the provider.

Go to BTCJam and register your application using the settings tab at the dashboard.

The callback url for this application will look like this

http://localhost:3000/users/auth/btcjam/callback

You need to set up environment variables to indicate the oauth2 provider values. In your environemnt file set up these variables

BTCJAM_APP_ID = "375c2e3fd..." # ID for your app registered at BTCJam
BTCJAM_APP_SECRET = "6a2fa82ab..." # Secret
BTCJAM_APP_URL = "https://btcjam.com" # BTCJam API URL

Now you are ready to start the app

rails s

License

Copyright (c) 2013 by Ovo Cósmico

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

btcjam-client's People

Contributors

celsopitta avatar teletubo avatar alexandre-palma avatar

Stargazers

 avatar  avatar Yann Thibodeau avatar Renan Ferrari avatar Yuri Moreno avatar maraoz avatar Mike Atlas avatar Eugene avatar Elvis Nuno avatar Ignacio Rodríguez avatar pee avatar Benji Brown avatar Alexander Salas Bastidas avatar chikadance avatar  avatar Lennart Lopin avatar  avatar  avatar Michael Egorov avatar Matt Luongo avatar RyccoSN avatar Macarse avatar Paul Keane avatar  avatar

Watchers

James Cloos avatar  avatar chikadance avatar  avatar George Palaganas avatar  avatar

btcjam-client's Issues

Need note market api.

Hi.

As complete api set, to resell note is not available right now.
When will it add to api? In plan?

Consuming API or reproducing this demo

I'm no pro at Rails and only have a passing understanding of how it functions.

Can you let me know why I'm failing miserably at:

ActionView::MissingTemplate in Home#index

Showing /home/fiend/btcjam-client/app/views/home/index.html.haml where line #66 raised:

Missing partial home/checks_forms, application/checks_forms with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee, :haml]}. Searched in:

  • "/home/fiend/btcjam-client/app/views"
  • "/home/fiend/.rvm/gems/ruby-2.1.2/gems/devise-3.2.3/app/views"
    Extracted source (around line #66):

63: .col-md-12
64: %h3.text-center
65: Submit your documents via API
66: = render partial: 'checks_forms'
67:
68: .col-md-12
69: %h2 BTCJam JSON API
Rails.root: /home/fiend/btcjam-client

Application Trace | Framework Trace | Full Trace
app/views/home/index.html.haml:66:in `_app_views_home_index_html_haml___1246978833775845159_28866220'
Request

Parameters:

None
Show session dump

Show env dump

Response

Headers:

None

after I press to authorize, then press the link on your site to authorize and then am redirected back to my app on localhost?

OR

could you please tell me what's required by the API's token url? In Python I'm able to use a standard oauth2 library to get an authorization url, get an authorization code from that url if I authorize the app, but then no matter what I try when I feed that code in through the token url it gives me:

{u'error_description': u'The request is missing a required parameter, includes an unsupported parameter value, or is otherwise malformed.', u'error': u'invalid_request'}

as a response. I'm almost sure that the Rails app sends some special json along with at least one of it's requests, but I can't figure it out for sure? It has site=>btcjam_app_url. Maybe that's just how omniauth knows what settings to use for the connection? I'm not sure.

Can you tell me what a properly formed request to grab a token is?

Or let me in on the secret to show that partial?

I'd much rather work in Python.

balance not available from any api

Account balance not available from any open api, and docs still list that on..
Perhaps we need to either remove from docs, or fix the api.

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.