REST API

The communication between server and client is managed with rest http. When you want invoke a specific method you can use : see also In Your Application Delegate. Demo code My_Bees_Core *my_bees = [[My_Bees_Core alloc] init]; NSString *method=@"/getMyprofile"; [my_bees send:method success:^(id responseObject){ NSLog(@"response: %@", responseObject); } failure:^(NSError * error){ NSLog(@"error: %@", error); }]; You can [...]

/sendCommand

Method description End point /sendCommand Description Sends a actuator command Request method POST Bearer token Required Request RequestParam None RequestBody { "command_type":6, "actuatorID":0, "nonce":0, "smartgate_serial":"myserial", "data":{"relay_value":0} } Field name Description Type command_type Command Type Integer actuatorID Actuator ID Long nonce Command Identifier (an user originated identifier for this command) Long smartgate_serial gateBee Serial String data Command [...]

Import framework in Xcode.

Import our framework is very simple, drag and drop file.framework in your project and on General tab in configuration you must drag and drop under Embedded Binaries

/getMyDataChannels

Method description End point /getMyDataChannels Description Returns the list of the user's Data channels Request method POST Bearer token Required Request RequestParam None RequestBody None Response A JSONArray representation of the user's Data channels Example [{ "sensor_id": 2, "sensor_prototype_id": 32, "sensor_prototype_name": "name", "bee_name": "name of the bee", "bee_prototype_id": 2, "sensor_name": "lamps power meter", "symbol": "W", [...]

/getMyRawEnergyData

Method description End point /getMyRawEnergyData Description Returns a JSON representation of the raw stored energy data of a particular sensor Request method POST Bearer token Required Request RequestParam Field name Description Type minutesBack Number of minutes in the past from the current date Long sensor_id Sensor identifier Long RequestBody None Response A JSON representation of [...]

/getMyEnergyData

Method description End point /getMyEnergyData Description Returns a JSON representation of the stored energy data of a particular sensor Request method POST Bearer token Required Request RequestParam Field name Description Type monthsBack Number of months in the past from the current date Integer sensor_id Sensor identifier Long RequestBody None Response A JSON representation of the [...]