Initialization

To initialize the SDK you have to create a token through the dashboard.

Click on the settings icon on the top-right and create an API Key specifying the permissions.

Then, in your AppDelegate application:didFinishLaunchingWithOptions: initialize the MBManager of the SDK setting a token like this:

import MBurger

…

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    MBManager.shared.apiToken = "YOUR_API_TOKEN"
    return true
}

Usage

You will use the MBClient class to make all the requests to the api to retrieve data from MBurger.

All the api calls have a plural version and the singular counterpart.

For example, you can retrieve the list of blocks of the project or you can retrieve a single block giving its id.

Last updated