Giter VIP home page Giter VIP logo

accela-ruby's Introduction

Accela Ruby Client Library

This gem provides access to the HTTP Accela API. The project's primary goal is to emulate the ActiveRecord API as far as it makes sense against the Accela API.

Models

Creating a new instance:

Accela::Record.new
Accela::Record.new housing_units: 98

Network based methods

The following methods communicate directly with the Accela REST API.

Creating a model

Here is an example workflow:

input_record = Accela::Record.new housing_units: 829,
                                  type: { type.id = "Building-Commercial-Addition-NA" }
record = Accela::RecordAPI.create_record(input_record)
record.id # => "ISLANDTON-14CAP-00000-000CR"

Fetching models

Most models support the all and find methods. These work similar to ActiveRecord. all returns all records for a given type (with a few caveats). Find accepts an id paramater and returns a single instance with the given id.

records = Accela::RecordAPI.get_all_records
records.length # => 25

record = Accela::RecordAPI.get_records("ISLANDTON-14CAP-00000-000CR")
record.name # => "D-I Builders Development Model Home"

Development

To begin:

$ git clone [email protected]:d-i/accela-ruby.git
$ cd accela-ruby
$ bundle install
$ rake test
$ rake console

The built in Rake task rake console will load the gem and a development environment in a Pry REPL. If you plan on making authentication protected API calls, make sure to log in first. e.g.:

Accela::API.connection.login("developer", "accela", "records addresses")

Building the gem

$ rake gem

Cleaning up VCR cassettes and gem build

$ rake clean

accela-ruby's People

Contributors

axtheset avatar dgoerlich avatar wiegand avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

opencounter

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.