Skip to content

Commit

Permalink
Merge pull request #51 from sensebox/feat/docs-changes
Browse files Browse the repository at this point in the history
Feat/docs changes
  • Loading branch information
fab-scm authored Jul 12, 2023
2 parents 977ca7a + 44776c0 commit b14e49f
Show file tree
Hide file tree
Showing 32 changed files with 205 additions and 218 deletions.
5 changes: 1 addition & 4 deletions docs/docs/Devices/create-new-device.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ description: "Creates a new device from the information given in the requestBody
sidebar_label: Create a new device
hide_title: true
hide_table_of_contents: true
api: {"description":"Creates a new device from the information given in the requestBody","tags":["devices"],"operationId":"create-new-device","parameters":[{"in":"header","name":"Authorization","schema":{"type":"string"},"required":true,"description":"Token retrieved from the opensensemap API LogIn\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"device object that should be created\n","properties":{"label":{"type":"array","description":"array with label objects in different languages specified for the device\n","items":{"type":"object","properties":{"value":{"type":"string","description":"the label text itself\n"},"lang":{"type":"string","description":"languageCode for the language of the lebel. e.g. `en`, `de`,...\n"}}}},"description":{"type":"object","properties":{"text":{"type":"string","description":"the description text\n"}}},"markdown":{"type":"object","properties":{"text":{"type":"string","description":"the markdown text\n"}}},"sensor":{"type":"array","description":"array with the sensors to connect to the device\n","items":{"type":"object","properties":{"sensor":{"type":"integer","description":"the id of the sensor to connect\n"}}}},"website":{"type":"string","nullable":true,"description":"a url that leads to the website of the device; 'null' if currently not specified\n"},"contact":{"type":"string","nullable":true,"description":"contact information to get help/support on the devices functionality; 'null' if currently not specified\n"},"image":{"type":"string","nullable":true,"description":"the name of the belonging image of the device so that it can be retrieved from the source; 'null' if currently not specified\n"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"plain device object\n","properties":{"id":{"type":"integer","description":"the id of the created device"},"slug":{"type":"string","description":"the slug of the created device"},"website":{"type":"string","description":"a url that leads to the website of the device; 'null' if currently not specified\n"},"contact":{"type":"string","description":"contact information to get help/support on the devices functionality; 'null' if currently not specified\n"},"image":{"type":"string","description":"the name of the belonging image of the device so that it can be retrieved from the source; 'null' if currently not specified\n"},"validation":{"type":"boolean","description":"boolean that is true if the information is validated by an admin\n"},"labelId":{"type":"integer","description":"the id of the created translation item"},"descriptionId":{"type":"integer","description":"the id of the created translation item"},"markdownId":{"type":"integer","description":"the id of the created translation item"}}}}}}},"method":"post","path":"/devices/device/create","servers":[{"url":"https://api.sensors.wiki","description":"Main (production) server"}],"jsonRequestBodyExample":{"label":[{"value":"string","lang":"string"}],"description":{"text":"string"},"markdown":{"text":"string"},"sensor":[{"sensor":0}],"website":"string","contact":"string","image":"string"},"info":{"title":"devices","version":"1.0.0"},"postman":{"name":"Create a new device","description":{"content":"Creates a new device from the information given in the requestBody","type":"text/plain"},"url":{"path":["devices","device","create"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}}
api: {"description":"Creates a new device from the information given in the requestBody","tags":["devices"],"operationId":"create-new-device","parameters":[{"in":"header","name":"Authorization","schema":{"type":"string"},"required":true,"description":"Token retrieved from the opensensemap API LogIn\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"device object that should be created\n","properties":{"label":{"type":"array","description":"array with label objects in different languages specified for the device\n","items":{"type":"object","properties":{"value":{"type":"string","description":"the label text itself\n"},"lang":{"type":"string","description":"languageCode for the language of the lebel. e.g. `en`, `de`,...\n"}}}},"description":{"type":"object","properties":{"text":{"type":"string","description":"the description text\n"}}},"markdown":{"type":"object","properties":{"text":{"type":"string","description":"the markdown text\n"}}},"sensor":{"type":"array","description":"array with the sensors to connect to the device\n","items":{"type":"object","properties":{"sensor":{"type":"integer","description":"the id of the sensor to connect\n"}}}},"website":{"type":"string","nullable":true,"description":"a url that leads to the website of the device; 'null' if currently not specified\n"},"contact":{"type":"string","nullable":true,"description":"contact information to get help/support on the devices functionality; 'null' if currently not specified\n"},"image":{"type":"string","nullable":true,"description":"the name of the belonging image of the device so that it can be retrieved from the source; 'null' if currently not specified\n"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"plain device object\n","properties":{"id":{"type":"integer","description":"the id of the created device"},"slug":{"type":"string","description":"the slug of the created device"},"website":{"type":"string","description":"a url that leads to the website of the device; 'null' if currently not specified\n"},"contact":{"type":"string","description":"contact information to get help/support on the devices functionality; 'null' if currently not specified\n"},"image":{"type":"string","description":"the name of the belonging image of the device so that it can be retrieved from the source; 'null' if currently not specified\n"},"validation":{"type":"boolean","description":"boolean that is true if the information is validated by an admin\n"},"labelId":{"type":"integer","description":"the id of the created translation item"},"descriptionId":{"type":"integer","description":"the id of the created translation item"},"markdownId":{"type":"integer","description":"the id of the created translation item"}}}}}}},"method":"post","path":"/devices/create","servers":[{"url":"https://api.sensors.wiki","description":"Main (production) server"}],"jsonRequestBodyExample":{"label":[{"value":"string","lang":"string"}],"description":{"text":"string"},"markdown":{"text":"string"},"sensor":[{"sensor":0}],"website":"string","contact":"string","image":"string"},"info":{"title":"devices","version":"1.0.0"},"postman":{"name":"Create a new device","description":{"content":"Creates a new device from the information given in the requestBody","type":"text/plain"},"url":{"path":["devices","create"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}}
sidebar_class_name: "post api-method"
sidebar_position: 4
info_path: docs/Devices/devices
pagination_next: null
pagination_prev: null
---

import ApiTabs from "@theme/ApiTabs";
Expand Down
5 changes: 1 addition & 4 deletions docs/docs/Devices/delete-device.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ description: "Delete a specific device by its id"
sidebar_label: Delete a device
hide_title: true
hide_table_of_contents: true
api: {"description":"Delete a specific device by its id","tags":["devices"],"operationId":"delete-device","parameters":[{"in":"header","name":"Authorization","schema":{"type":"string"},"required":true,"description":"Token retrieved from the opensensemap API LogIn\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"device object that should be delted\n","properties":{"id":{"type":"integer","description":"the id of the device to delete\n"},"sensor":{"type":"array","description":"array with the sensors connected to the device to delete\n","items":{"type":"object","properties":{"sensor":{"type":"integer","description":"the id of the sensor to disconnect\n"}}}},"translationIds":{"type":"array","description":"array with all the translationIds to be deleted, that belong to the device\n"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"info":{"type":"string","description":"info text that indicates if the deleting of the device was successfull\n"}}}}}}},"method":"post","path":"/devices/device/delete","servers":[{"url":"https://api.sensors.wiki","description":"Main (production) server"}],"jsonRequestBodyExample":{"id":0,"sensor":[{"sensor":0}],"translationIds":[null]},"info":{"title":"devices","version":"1.0.0"},"postman":{"name":"Delete a device","description":{"content":"Delete a specific device by its id","type":"text/plain"},"url":{"path":["devices","device","delete"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}}
api: {"description":"Delete a specific device by its id","tags":["devices"],"operationId":"delete-device","parameters":[{"in":"header","name":"Authorization","schema":{"type":"string"},"required":true,"description":"Token retrieved from the opensensemap API LogIn\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"device object that should be delted\n","properties":{"id":{"type":"integer","description":"the id of the device to delete\n"},"sensor":{"type":"array","description":"array with the sensors connected to the device to delete\n","items":{"type":"object","properties":{"sensor":{"type":"integer","description":"the id of the sensor to disconnect\n"}}}},"translationIds":{"type":"array","description":"array with all the translationIds to be deleted, that belong to the device\n"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"info":{"type":"string","description":"info text that indicates if the deleting of the device was successfull\n"}}}}}}},"method":"post","path":"/devices/delete","servers":[{"url":"https://api.sensors.wiki","description":"Main (production) server"}],"jsonRequestBodyExample":{"id":0,"sensor":[{"sensor":0}],"translationIds":[null]},"info":{"title":"devices","version":"1.0.0"},"postman":{"name":"Delete a device","description":{"content":"Delete a specific device by its id","type":"text/plain"},"url":{"path":["devices","delete"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}}
sidebar_class_name: "post api-method"
sidebar_position: 6
info_path: docs/Devices/devices
pagination_next: null
pagination_prev: null
---

import ApiTabs from "@theme/ApiTabs";
Expand Down
Loading

0 comments on commit b14e49f

Please sign in to comment.