![]() |
RAPP Platform API
|
Public Member Functions | |
| def | __init__ |
| def | cognitiveExerciseSelect |
| Cognitive Exercise selection (chooser) API service call. More... | |
| def | cognitiveGetHistory |
| Gognitive get history records API service call. More... | |
| def | cognitiveGetScores |
| Gognitive get score records API service call. More... | |
| def | cognitiveRecordPerformance |
| Gognitive record performance of an exercise API service call. More... | |
| def | emailFetch |
| Email fetch API service call. More... | |
| def | emailSend |
| Email fetch API service call. More... | |
| def | faceDetection |
| Face detection API service call. More... | |
| def | geolocation |
| Geolocation API service call. More... | |
| def | hazardDetectionDoor |
| Hazard detection door check API service call. More... | |
| def | hazardDetectionLights |
| Hazard detection light check API service call. More... | |
| def | humanDetection |
| Human detection API service call. More... | |
| def | newsExplore |
| News Explorer API service call. More... | |
| def | objectRecognitionCaffe |
| Object Recognition Caffe API service call. More... | |
| def | ontologyIsSubsuperclass |
| Ontology is-supsuperclass-of API service call. More... | |
| def | ontologySubclasses |
| Ontology subclasses-of API service call. More... | |
| def | ontologySuperclasses |
| Ontology superclasses-of API service call. More... | |
| def | pathPlanningPlan2D |
| Path planning plan path 2D API service call. More... | |
| def | pathPlanningUploadMap |
| Path planning upload map API service call. More... | |
| def | qrDetection |
| QR code detection API service call. More... | |
| def | setNoiseProfile |
| Set Noise Profile API service call. More... | |
| def | speechRecognitionGoogle |
| Speech recognition Google API service call. More... | |
| def | speechRecognitionSphinx |
| Speech recognition Sphinx API service call. More... | |
| def | textToSpeech |
| Text to Speech API service call. More... | |
| def | weatherReportCurrent |
| Weather report current API service call. More... | |
| def | weatherReportForecast |
| Weather report forecast API service call. More... | |
Public Attributes | |
| svc_caller | |
RAPP Platform simple API implementation
Definition at line 57 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.__init__ | ( | self | ) |
Definition at line 59 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.cognitiveExerciseSelect | ( | self, | |
test_type = '', |
|||
test_subtype = '', |
|||
test_diff = -1, |
|||
test_index = -1 |
|||
| ) |
Cognitive Exercise selection (chooser) API service call.
test_type: string
| test_type | Cognitive Exercise test type. Defaults to empty. |
test_subtype: string
| test_subtype | Force exercise selection from this subtype. Defaults to empty. |
test_diff: int
| test_diff | Force exercise selection from this difficulty. Defaults to empty. |
test_index: int
| test_diff | Force exercise selection from this difficulty. Defaults to empty. |
: dict
Definition at line 373 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.cognitiveGetHistory | ( | self, | |
test_type = '', |
|||
time_from = 0, |
|||
time_to = 0 |
|||
| ) |
Gognitive get history records API service call.
test_type: string
| test_type | Cognitive Exercise test type. Defaults to empty. |
time_from: int
| time_from | Retrieve history records from this timestamp value. Unix timestamp. Defaults to zero (0). |
time_to: int
| time_from | Retrieve history records up to this timestamp value. Unix timestamp. Defaults to zero (0). |
: dict
Definition at line 415 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.cognitiveGetScores | ( | self, | |
test_type = '', |
|||
time_to = 0 |
|||
| ) |
Gognitive get score records API service call.
test_type: string
| test_type | Cognitive Exercise test type. Defaults to empty. |
time_to: int
| time_from | Retrieve score records up to this timestamp value. Unix timestamp. Defaults to zero (0). |
: dict
Definition at line 446 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.cognitiveRecordPerformance | ( | self, | |
| test_instance, | |||
| score | |||
| ) |
Gognitive record performance of an exercise API service call.
test_instance: string
| test_instance | Performed cognitive exercise test instance. The full cognitive test entry name as obtained from CognitiveExerciseSelect API service call |
: dict
Definition at line 473 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.emailFetch | ( | self, | |
| email, | |||
| password, | |||
| server, | |||
| port, | |||
| date_from, | |||
| date_to, | |||
email_status = 'UNSEEN', |
|||
num_emails = 1 |
|||
| ) |
Email fetch API service call.
email: string
| User's email username |
password: string
| password | User's email password |
server: string
| server | The email provider imap address. |
port: string
| port | The email provider imap port. |
date_from: int
| date_from | Fetch emails since this timestamp value. Unix timestamp. |
date_to: int
| date_to | Fetch emails up to this timestamp value. Unix timestamp. |
email_status: string
| email_status | Email status (ALL, UNSEEN). Defaults to 'UNSEEN' |
num_emails: int
| num_emails | Maximum number of emails to fetch. |
: dict
Definition at line 498 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.emailSend | ( | self, | |
| email, | |||
| password, | |||
| server, | |||
| port, | |||
| recipients, | |||
| body, | |||
| subject, | |||
attach_file = '' |
|||
| ) |
Email fetch API service call.
email: string
| User's email username |
password: string
| password | User's email password |
server: string
| server | The email provider imap address. |
port: string
| port | The email provider imap port. |
recipients: list
| recipients | List of recipients email addresses. |
body: string
| body | The body of the email. |
subject: string
| subject | The email subject. |
attach_file: string
| attach_file | Attachment file (path). Attachment file can be a .zip file containing multiple attachment files for the email to send |
: dict
Definition at line 550 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.faceDetection | ( | self, | |
| imageFilepath, | |||
fast = False |
|||
| ) |
Face detection API service call.
imageFilepath: string
| imageFilepath | Path to the image file. |
fast: bool
| fast | Perform fast detection. If true, detection will take less time but it will be less accurate. |
: dict
Definition at line 62 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.geolocation | ( | self, | |
| ipaddr, | |||
engine = 'ip-api' |
|||
| ) |
Geolocation API service call.
ipaddr: string
| ipaddr | The machine's ipv4 address. |
engine: string
| engine | Engine to use. Defaults to 'ip-api'. |
: dict
Definition at line 810 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.hazardDetectionDoor | ( | self, | |
| imageFilepath | |||
| ) |
Hazard detection door check API service call.
imageFilepath: string
| imageFilepath | Path to the image file. |
: dict
Definition at line 131 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.hazardDetectionLights | ( | self, | |
| imageFilepath | |||
| ) |
Hazard detection light check API service call.
imageFilepath: string
| imageFilepath | Path to the image file. |
: dict
Definition at line 152 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.humanDetection | ( | self, | |
| imageFilepath | |||
| ) |
Human detection API service call.
imageFilepath: string
| imageFilepath | Path to the image file. |
: dict
Definition at line 109 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.newsExplore | ( | self, | |
| keywords, | |||
region = '', |
|||
topic = '', |
|||
news_engine = '', |
|||
num_news = 1, |
|||
exclude_titles = [] |
|||
| ) |
News Explorer API service call.
keywords: list
| keywords | Desired keywords. |
region: string
| region | language/region |
topic: string
| topic | Main topic. e.g. 'sports', 'politics', etc |
news_engine: string
| news_engine | The news search engine to use. Optional |
num_news: string
| num_news | Number of news stories to request. |
exclude_titles: list
| exclude_titles | Exclude these titles |
: dict
Definition at line 769 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.objectRecognitionCaffe | ( | self, | |
| imageFilepath | |||
| ) |
Object Recognition Caffe API service call.
imageFilepath: string
| imageFilepath | Path to the image file. |
: dict
Definition at line 173 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.ontologyIsSubsuperclass | ( | self, | |
| parent_class, | |||
| child_class, | |||
recursive = False |
|||
| ) |
Ontology is-supsuperclass-of API service call.
parent_class: string
| parent_class | The ontology parent class name. |
child_class: string
| child_class | The ontology child class name. |
recursive: bool
| recursive | Recursive search. Defaults to False. |
: dict
Definition at line 343 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.ontologySubclasses | ( | self, | |
| ontology_class, | |||
recursive = False |
|||
| ) |
Ontology subclasses-of API service call.
ontology_class: string
| ontology_class | The ontology class. |
recursive: bool
| recursive | Recursive search. Defaults to False. |
: dict
Definition at line 293 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.ontologySuperclasses | ( | self, | |
| ontology_class, | |||
recursive = False |
|||
| ) |
Ontology superclasses-of API service call.
ontology_class: string
| ontology_class | The ontology class. |
recursive: bool
| recursive | Recursive search. Defaults to False. |
: dict
Definition at line 318 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.pathPlanningPlan2D | ( | self, | |
| map_name, | |||
| robot_type, | |||
| pose_start, | |||
| pose_goal, | |||
algorithm = 'dijkstra' |
|||
| ) |
Path planning plan path 2D API service call.
map_name: string
| map_name | The map name. |
robot_type: string
| robot_type | The robot type. e.g 'NAO' |
pose_start: dict
| pose_start | Start pose of the robot. |
pose_goal: dict
| pose_goal | Goal pose of the robot. |
algorithm: string
| algorithm | Path planning algorithm to apply. Defaults to 'dijkstra' |
: dict
Definition at line 670 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.pathPlanningUploadMap | ( | self, | |
| map_name, | |||
| png_file, | |||
| yaml_file | |||
| ) |
Path planning upload map API service call.
map_name: string
| map_name | The map name |
png_file: string
| png_file | Path to the map png file |
yaml_file: string
| yaml_file | Path to the map descriptor yaml file. |
: dict
Definition at line 710 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.qrDetection | ( | self, | |
| imageFilepath | |||
| ) |
QR code detection API service call.
imageFilepath: string
| imageFilepath | Path to the image file. |
: dict
Definition at line 87 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.setNoiseProfile | ( | self, | |
| audiofile, | |||
| audio_source | |||
| ) |
Set Noise Profile API service call.
audiofile: string
| audiofile | Path to the audio file. |
audio_source: string
| audio_source | Audio source format. e.g. 'nao_wav_1_ch' |
: dict
Definition at line 194 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.speechRecognitionGoogle | ( | self, | |
| audiofile, | |||
| audio_source, | |||
| language | |||
| ) |
Speech recognition Google API service call.
audiofile: string
| audiofile | Path to the audio file. |
audio_source: string
| audio_source | Audio source format. e.g. 'nao_wav_1_ch' |
language: string
| language | Language to use for speech recognition. |
: dict
Definition at line 263 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.speechRecognitionSphinx | ( | self, | |
| audiofile, | |||
| audio_source, | |||
| language, | |||
| words, | |||
sentences = [], |
|||
grammar = [] |
|||
| ) |
Speech recognition Sphinx API service call.
audiofile: string
| audiofile | Path to the audio file. |
audio_source: string
| audio_source | Audio source format. e.g. 'nao_wav_1_ch' |
language: string
| language | Language to use for speech recognition. |
words: list
| words | To recognize words. |
sentences: list
| sentences | Under consideration sentences. Same as words by default. |
grammar: list
| grammar | Grammar to use. Defaults to none. |
: dict
Definition at line 219 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.textToSpeech | ( | self, | |
| text, | |||
| language, | |||
| audio_file | |||
| ) |
Text to Speech API service call.
text: string
| text | Input text to translate to audio. |
language: string
| language | Text language. |
audio_file: string
| audio_file | File path to store the audio data. |
: dict
Definition at line 738 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.weatherReportCurrent | ( | self, | |
| city, | |||
weather_reporter = 'forecast.io', |
|||
metric = 0 |
|||
| ) |
Weather report current API service call.
city: string
| city | City location. |
weather_reporter: string
| weather_reporter | The weather reporter API to use. Defaults to 'forecast.io' |
metric: int
| metric | Value units (0:Celcius, 1:Fahrenheit) Defaults to 0 (Celcius) |
: dict
Definition at line 600 of file RappPlatformApi.py.
| def RappCloud.RappPlatformApi.RappPlatformAPI.weatherReportForecast | ( | self, | |
| city, | |||
weather_reporter = 'forecast.io', |
|||
metric = 0 |
|||
| ) |
Weather report forecast API service call.
city: string
| city | City location. |
weather_reporter: string
| weather_reporter | The weather reporter API to use. Defaults to 'forecast.io' |
metric: int
| metric | Value units (0:Celcius, 1:Fahrenheit) Defaults to 0 (Celcius) |
: dict
Definition at line 639 of file RappPlatformApi.py.
| RappCloud.RappPlatformApi.RappPlatformAPI.svc_caller |
Definition at line 60 of file RappPlatformApi.py.