1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-06 03:50:04 +02:00

cleaned up per vbanthia's comments. fixed docs to align with implementation

This commit is contained in:
kris 2017-06-14 21:38:09 -05:00
parent eb069bbdf3
commit 9f3f0b9692
3 changed files with 8 additions and 21 deletions

View file

@ -287,7 +287,7 @@ POST /api/v1/user/devices/{serial}/remoteConnect
Using cURL: Using cURL:
```bash ```bash
curl -X POST --header "Content-Type: application/json" -H "Authorization: Bearer YOUR-TOKEN-HERE" https://stf.example.org/api/v1/user/devices/{serial}/remoteConnect curl -X POST -H "Authorization: Bearer YOUR-TOKEN-HERE" https://stf.example.org/api/v1/user/devices/{serial}/remoteConnect
``` ```
Using Node.js: Using Node.js:
@ -384,7 +384,7 @@ function add_device
function remote_connect function remote_connect
{ {
response=$(curl -X POST -H "Content-Type: application/json" \ response=$(curl -X POST \
-H "Authorization: Bearer $STF_TOKEN" \ -H "Authorization: Bearer $STF_TOKEN" \
$STF_URL/api/v1/user/devices/$DEVICE_SERIAL/remoteConnect) $STF_URL/api/v1/user/devices/$DEVICE_SERIAL/remoteConnect)
@ -404,7 +404,7 @@ function remote_connect
function remove_device function remove_device
{ {
response=$(curl -X DELETE -H "Content-Type: application/json" \ response=$(curl -X DELETE \
-H "Authorization: Bearer $STF_TOKEN" \ -H "Authorization: Bearer $STF_TOKEN" \
$STF_URL/api/v1/user/devices/$DEVICE_SERIAL) $STF_URL/api/v1/user/devices/$DEVICE_SERIAL)

View file

@ -1,6 +1,6 @@
swagger: "2.0" swagger: "2.0"
info: info:
version: "2.0.1" version: "2.3.0"
title: Smartphone Test Farm title: Smartphone Test Farm
description: Control and manages real Smartphone devices from browser and restful apis description: Control and manages real Smartphone devices from browser and restful apis
license: license:
@ -16,6 +16,7 @@ schemes:
- https - https
consumes: consumes:
- application/json - application/json
- application/octet-stream
produces: produces:
- application/json - application/json
tags: tags:
@ -124,8 +125,6 @@ paths:
summary: Delete User Device summary: Delete User Device
description: The User Devices endpoint will request for device release from stf server. It will return request accepted if device is being used by current user description: The User Devices endpoint will request for device release from stf server. It will return request accepted if device is being used by current user
operationId: deleteUserDeviceBySerial operationId: deleteUserDeviceBySerial
consumes:
- application/octet-stream
tags: tags:
- user - user
parameters: parameters:
@ -151,8 +150,6 @@ paths:
summary: Remote Connect summary: Remote Connect
description: The device connect endpoint will request stf server to connect remotely description: The device connect endpoint will request stf server to connect remotely
operationId: remoteConnectUserDeviceBySerial operationId: remoteConnectUserDeviceBySerial
consumes:
- application/octet-stream
tags: tags:
- user - user
parameters: parameters:
@ -176,8 +173,6 @@ paths:
summary: Remote Disconnect summary: Remote Disconnect
description: The device connect endpoint will request stf server to disconnect remotely description: The device connect endpoint will request stf server to disconnect remotely
operationId: remoteDisconnectUserDeviceBySerial operationId: remoteDisconnectUserDeviceBySerial
consumes:
- application/octet-stream
tags: tags:
- user - user
parameters: parameters:

View file

@ -1,7 +1,7 @@
{ {
"swagger": "2.0", "swagger": "2.0",
"info": { "info": {
"version": "2.0.1", "version": "2.3.0",
"title": "Smartphone Test Farm", "title": "Smartphone Test Farm",
"description": "Control and manages real Smartphone devices from browser and restful apis", "description": "Control and manages real Smartphone devices from browser and restful apis",
"license": { "license": {
@ -20,7 +20,8 @@
"https" "https"
], ],
"consumes": [ "consumes": [
"application/json" "application/json",
"application/octet-stream"
], ],
"produces": [ "produces": [
"application/json" "application/json"
@ -189,9 +190,6 @@
"summary": "Delete User Device", "summary": "Delete User Device",
"description": "The User Devices endpoint will request for device release from stf server. It will return request accepted if device is being used by current user", "description": "The User Devices endpoint will request for device release from stf server. It will return request accepted if device is being used by current user",
"operationId": "deleteUserDeviceBySerial", "operationId": "deleteUserDeviceBySerial",
"consumes": [
"application/octet-stream"
],
"tags": [ "tags": [
"user" "user"
], ],
@ -228,9 +226,6 @@
"summary": "Remote Connect", "summary": "Remote Connect",
"description": "The device connect endpoint will request stf server to connect remotely", "description": "The device connect endpoint will request stf server to connect remotely",
"operationId": "remoteConnectUserDeviceBySerial", "operationId": "remoteConnectUserDeviceBySerial",
"consumes": [
"application/octet-stream"
],
"tags": [ "tags": [
"user" "user"
], ],
@ -267,9 +262,6 @@
"summary": "Remote Disconnect", "summary": "Remote Disconnect",
"description": "The device connect endpoint will request stf server to disconnect remotely", "description": "The device connect endpoint will request stf server to disconnect remotely",
"operationId": "remoteDisconnectUserDeviceBySerial", "operationId": "remoteDisconnectUserDeviceBySerial",
"consumes": [
"application/octet-stream"
],
"tags": [ "tags": [
"user" "user"
], ],