0.0
No commit activity in last 3 years
No release in over 3 years
Ruby wrapper to the Phonegap build API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.0.0
~> 1.8.3
~> 3.12
~> 2.8.0

Runtime

 Project Readme

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"=>"ian@ruby-code.com", "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.