Giter Site home page Giter Site logo

people_view's Introduction

NationBuilder Sample API Client

Installation

Prerequisites:

Steps:

  1. In order to use this sample application, clone the repository and cd to it:
  git clone https://github.com/3dna/people_view
  cd people_view
  1. Once inside, you must install the project's dependencies with bundler:
  bundle install
  1. Once the bundling process completes, you need to provide database credentials in config/database.yml
  cp config/database.yml.example config/database.yml
  # edit database.yml to match your configuration.  The example file is sufficient to start
  1. Migrate the database you set up:
  bundle exec rake db:migrate db:test:prepare
  1. Run the server:
  bundle exec script/rails server

Now you should be able to use the application, just navigate to http://localhost:3000 by default

Please read the API documentation for more information on API usage.

Usage

Authentication

When you navigate to the sample app root path, you should see an empty page.

  1. Click "New Nation" to register a nation with this sample application
  2. At this point you will need an application that has a redirect_uri of the host you are using:
    • Go to an API-whitelisted nation's control panel
    • Navigate links from Settings > OAuth > New Application
    • Name this application, for example "People View Local"
    • Set the Redirect URI to the fully qualified domain name and protocol you are using, with the path "callback", ex. "http://localhost:3000/callback"
    • Click "Register" and note your client uid and secret key for the next step
  3. Fill in the details of your nation:
    • Give it a meaningful name. ex. Foobar Nation
    • Provide the url, including https protocol. ex. https://foobar.nationbuilder.com/
    • Provide the client uid and secret key you got from registration of your app
    • The file input is for a logo, feel free into upload an image
  4. When you submit the form you should be redirected to the nation selection page. Select your nation there and it should take you through the authorization process.
  5. Optionally sign into your nation
  6. When you accept the request to use the data, you should be redirected to the people list

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.