Code Monkey home page Code Monkey logo

cydia_go_api's Introduction

Golang Cydia API

The Golang Cydia API allows you to check the status of a purchased package for an iOS device. It is intended for use in anti-piracy server backends.

##Installation

Install the API to your system using the following command:

$ go get github.com/eswick/cydia_go_api

##Usage First, import the package.

import "github.com/eswick/cydia_go_api"

The only public function in the API is CheckCydiaPurchase, as follows:

func CheckCydiaPurchase(udid string, package_id string, dev string, apikey string) (*CydiaPurchaseInfo, error);

Arguments

 udid

   The UDID of the device for which purchase information is to be retrieved.

 package_id

   The package identifier of the package to check.

 dev

   Your vendor ID. (obtained from Cydia's web interface)

 apikey

   Your API key. (also obtained from Cydia's web interface)

###Return Value

CheckCydiaPurchase returns a CydiaPurchaseInfo struct containing data from the Cydia API response, or nil + an error if an error occurred.

####Example

info, err := cydia.CheckCydiaPurchase("udid_here", "us.kanyon.beacon", "eswick", "api_key_here");

if(err != nil){
	fmt.Println("Error checking Cydia API.");
	return;
}

if(info.PurchaseComplete()){
    fmt.Println("Purchase complete!");
}else{
    fmt.Println("Purchase incomplete.");
}

cydia_go_api's People

Contributors

eswick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.