Skip to content

Commit

Permalink
cleaned up per vbanthia's comments. fixed docs to align with implemen…
Browse files Browse the repository at this point in the history
…tation
  • Loading branch information
kris committed Jun 15, 2017
1 parent eb069bb commit 9f3f0b9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 21 deletions.
6 changes: 3 additions & 3 deletions doc/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ POST /api/v1/user/devices/{serial}/remoteConnect
Using cURL:

```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:
Expand Down Expand Up @@ -384,7 +384,7 @@ function add_device

function remote_connect
{
response=$(curl -X POST -H "Content-Type: application/json" \
response=$(curl -X POST \
-H "Authorization: Bearer $STF_TOKEN" \
$STF_URL/api/v1/user/devices/$DEVICE_SERIAL/remoteConnect)

Expand All @@ -404,7 +404,7 @@ function remote_connect

function remove_device
{
response=$(curl -X DELETE -H "Content-Type: application/json" \
response=$(curl -X DELETE \
-H "Authorization: Bearer $STF_TOKEN" \
$STF_URL/api/v1/user/devices/$DEVICE_SERIAL)

Expand Down
9 changes: 2 additions & 7 deletions lib/units/api/swagger/api_v1.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
swagger: "2.0"
info:
version: "2.0.1"
version: "2.3.0"
title: Smartphone Test Farm
description: Control and manages real Smartphone devices from browser and restful apis
license:
Expand All @@ -16,6 +16,7 @@ schemes:
- https
consumes:
- application/json
- application/octet-stream
produces:
- application/json
tags:
Expand Down Expand Up @@ -124,8 +125,6 @@ paths:
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
operationId: deleteUserDeviceBySerial
consumes:
- application/octet-stream
tags:
- user
parameters:
Expand All @@ -151,8 +150,6 @@ paths:
summary: Remote Connect
description: The device connect endpoint will request stf server to connect remotely
operationId: remoteConnectUserDeviceBySerial
consumes:
- application/octet-stream
tags:
- user
parameters:
Expand All @@ -176,8 +173,6 @@ paths:
summary: Remote Disconnect
description: The device connect endpoint will request stf server to disconnect remotely
operationId: remoteDisconnectUserDeviceBySerial
consumes:
- application/octet-stream
tags:
- user
parameters:
Expand Down
14 changes: 3 additions & 11 deletions lib/units/api/swagger/api_v1_generated.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"version": "2.0.1",
"version": "2.3.0",
"title": "Smartphone Test Farm",
"description": "Control and manages real Smartphone devices from browser and restful apis",
"license": {
Expand All @@ -20,7 +20,8 @@
"https"
],
"consumes": [
"application/json"
"application/json",
"application/octet-stream"
],
"produces": [
"application/json"
Expand Down Expand Up @@ -189,9 +190,6 @@
"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",
"operationId": "deleteUserDeviceBySerial",
"consumes": [
"application/octet-stream"
],
"tags": [
"user"
],
Expand Down Expand Up @@ -228,9 +226,6 @@
"summary": "Remote Connect",
"description": "The device connect endpoint will request stf server to connect remotely",
"operationId": "remoteConnectUserDeviceBySerial",
"consumes": [
"application/octet-stream"
],
"tags": [
"user"
],
Expand Down Expand Up @@ -267,9 +262,6 @@
"summary": "Remote Disconnect",
"description": "The device connect endpoint will request stf server to disconnect remotely",
"operationId": "remoteDisconnectUserDeviceBySerial",
"consumes": [
"application/octet-stream"
],
"tags": [
"user"
],
Expand Down

0 comments on commit 9f3f0b9

Please sign in to comment.