
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
ApigeePlatform is a ruby wrapper for Apigee Platform API (http://apigee.com/).
Full API documentation - http://apigee.com/docs/api/api-resources
Gem is based on ActiveResource.
gem install apigee-platform
require 'apigee-platform'
ApigeePlatform::Objects::Base.configure :user => 'user@example.com', :password => 'your_password', :organization => 'your_apigee_org'
Retreive developers list
ApigeePlatform::Objects::Developer.all
# => ["liukang@example.com", "kano@example.com"]
Find developer. You could use email or ID here.
developer = ApigeePlatform::Objects::Developer.find 'johnny@example.com'
Create new developer
developer = ApigeePlatform::Objects::Developer.new :firstName => 'Johnny', :lastName => 'Cage', :userName => 'johnnycage', :email => 'johnny@example.com'
developer.save
# => true
developer.errors.full_messages
# => []
Update developer attributes
developer.firstName = 'SuperJohnny'
developer.save
# => true
Get Apps assigned to developer
developer.apps
# => ['app1', 'app2']
Create new app for developer
new_app = developer.create_app
new_app.name = 'my_super_app'
new_app.save
# => true
Find developer app by name
app = developer.app 'my_super_app'
# or you could use DeveloperApp resource directly
app = ApigeePlatform::Objects::DeveloperApp.find 'my_super_app', :params => {:developer_id => DEVELOPER_ID_OR_EMAIL}
Get developer app keys. Keys were created automatically by Apigee with app.
app.keys
Manage apiproducts of key
key = app.keys.first
# assigned apiproducts for key
key.apiproducts
# => {}
# existing apiproducts list
ApigeePlatform::Objects::Apiproduct.all
# => ['mkworld', 'midway']
key.add_product 'mytest'
# => 'pending'
key.apiproducts
# => {"mytest"=>"pending"}
# approve product
key.approve_product 'mytest'
# => "approved"
# revoke product
key.revoke_product 'mytest'
# => "revoked"
# remove product
key.remove_product 'mytest'
# => true
Delete developer app
app.destroy
Delete developer
developer.destroy
Comapnies API is similar to developers API.
company = ApigeePlatform::Objects::Company.create :name => 'my_new_company'
company.apps
# => []
new_app = company.create_app
new_app.name = 'my_super_app2'
new_app.save
# => true
key = new_app.keys.first
key.add_product 'mytest'
# => 'pending'
key.apiproducts
# => {"mytest"=>"pending"}
# approve product
key.approve_product 'mytest'
# => "approved"
# revoke product
key.revoke_product 'mytest'
# => "revoked"
# remove product
key.remove_product 'mytest'
# => true
Some resources (developer, company, apiproduct) has custom attributes. It is accessible under custom_attributes method which behave like a Hash.
developer.custom_attributes
# => {}
developer.custom_attributes[:attr1] = 'val1'
developer.save
Copyright (c) 2013 Vasiliy Sablin. See LICENSE.txt for further details.
FAQs
Unknown package
We found that apigee-platform demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.