Skip to content

seeingidog/phonegap-api

Repository files navigation

phonegap-api

Ruby wrapper for the Phonegap build API.

build.phonegap.com build.phonegap.com/docs/api

Installation

gem install phonegap-api

Examples

Create connection

conn = Phonegap::Connection.new(:username => "username", :password =>"password")

Or with config/phonegap.yml populated with phonegap build credentials

conn = Phonegap::Connection.new

List applications

conn.apps
=> #<Phonegap::Apps:0x000001009d30e0 @apps=[#<Phonegap::App:0x000001009d3068 @repo="http://github.com/phonegap/phonegap-start.git", @download={"webos"=>"/api/v1/apps/94659/webos", "blackberry"=>"/api/v1/apps/94659/blackberry", "android"=>"/api/v1/apps/94659/android", "symbian"=>"/api/v1/apps/94659/symbian"}, title"PhoneGap: Getting Started", phonegap_version"1.5.0", privatefalse, role"admin", icon{"filename"=>"icon.png", "link"=>"/api/v1/apps/94659/icon"}, id94659, version"1.0.0", package"com.phonegap.getting.started", link"/api/v1/apps/94659", description"A template for getting started with PhoneGap development and build.phonegap.com", debugfalse, status{"webos"=>"complete", "ios"=>nil, "blackberry"=>"complete", "android"=>"complete", "symbian"=>"complete"}, error{}, build_count4], link"/api/v1/apps"

Build/Create sample application

conn.create_app(:title => 'API test app', :repo => 'https://github.com/alunny/phonegap-start.git', :create_method => 'remote_repo')
=> {"keys"=>{"ios"=>nil, "blackberry"=>nil, "android"=>nil}, "repo"=>"https://github.com/alunny/phonegap-start.git", "download"=>{}, "collaborators"=>{"pending"=>[], "link"=>"/api/v1/apps/98651/collaborators", "active"=>[{"person"=>"[email protected]", "role"=>"admin", "id"=>88276, "link"=>"/api/v1/apps/98651/collaborators/88276"}]}, "title"=>"alunnys Amazing App", "private"=>true, "phonegap_version"=>"1.5.0", "role"=>"admin", "icon"=>{"filename"=>"blurry.png", "link"=>"/api/v1/apps/98651/icon"}, "id"=>98651, "package"=>"com.alunny.amazing", "version"=>"1.0.0", "debug"=>false, "link"=>"/api/v1/apps/98651", "description"=>"An Amazing app by alunny", "status"=>{"webos"=>"pending", "ios"=>nil, "blackberry"=>"pending", "android"=>"pending", "symbian"=>"pending"}, "error"=>{}, "build_count"=>nil}

Delete application

conn.delete_app(94659)
=> {"success"=>"app 94659 deleted"}

Contribute

Feel free to open pull requests. Please add tests for new features.

Copyright © 2012 Ian Morgan. See LICENSE.txt for further details.

About

Ruby wrapper to the Phonegap build API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages