Update documentation for CI/CD and new hostname
This commit is contained in:
@@ -42,6 +42,14 @@ Starting the application:
|
|||||||
|
|
||||||
`$ python manage.py runserver`
|
`$ python manage.py runserver`
|
||||||
|
|
||||||
|
## Release and development process
|
||||||
|
New branches are cut from `master` and when it is ready for test and code review a pull-request is created and the branch is deployed to the staging environment after checking that the staging environment is free to deploy to.
|
||||||
|
A deploy to the staging environment is done using fab:
|
||||||
|
```sh
|
||||||
|
$ fab staging deploy
|
||||||
|
```
|
||||||
|
The staging branch is automatically synced from master on new commits to master.
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
To run unit tests:
|
To run unit tests:
|
||||||
|
|||||||
+4
-4
@@ -3,17 +3,17 @@
|
|||||||
## List categories
|
## List categories
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -X GET https://api2.photowall.com/categories/
|
curl -X GET https://api.photowall.com/categories/
|
||||||
```
|
```
|
||||||
|
|
||||||
## Show category
|
## Show category
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -X GET https://api2.photowall.com/categories/1
|
curl -X GET https://api.photowall.com/categories/1
|
||||||
```
|
```
|
||||||
|
|
||||||
## Update category
|
## Update category
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -X PUT https://api2.photowall.com/categories/1 -H "Content-Type: application/json" -d '{"name": "Dogs"}'
|
curl -X PUT https://api.photowall.com/categories/1 -H "Content-Type: application/json" -d '{"name": "Dogs"}'
|
||||||
```
|
```
|
||||||
|
|||||||
+5
-5
@@ -3,24 +3,24 @@
|
|||||||
## List designers
|
## List designers
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -X GET https://api2.photowall.com/designers/
|
curl -X GET https://api.photowall.com/designers/
|
||||||
```
|
```
|
||||||
|
|
||||||
## Show designer
|
## Show designer
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -X GET https://api2.photowall.com/designers/1
|
curl -X GET https://api.photowall.com/designers/1
|
||||||
```
|
```
|
||||||
|
|
||||||
## Create designer
|
## Create designer
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -X POST https://api2.photowall.com/designers/ -H "Content-Type: application/json" \
|
curl -X POST https://api.photowall.com/designers/ -H "Content-Type: application/json" \
|
||||||
-d '{"name": "Spiderman", "username": "spiderman", "territory": "US", "currency": "USD"}'
|
-d '{"name": "Spiderman", "username": "spiderman", "territory": "US", "currency": "USD"}'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Update designer
|
## Update designer
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -X PUT https://api2.photowall.com/designers/1 -H "Content-Type: application/json" -d '{"name": "Spiderman"}'
|
curl -X PUT https://api.photowall.com/designers/1 -H "Content-Type: application/json" -d '{"name": "Spiderman"}'
|
||||||
```
|
```
|
||||||
|
|||||||
+3
-3
@@ -3,17 +3,17 @@
|
|||||||
## Update pwinty_id
|
## Update pwinty_id
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -X POST https://api2.photowall.com/orders/1/pwinty_id -H "Content-Type: application/json" -d '{"value": 123}'
|
curl -X POST https://api.photowall.com/orders/1/pwinty_id -H "Content-Type: application/json" -d '{"value": 123}'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Update pwinty_image_id
|
## Update pwinty_image_id
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -X POST https://api2.photowall.com/order-rows/1/pwinty_image_id -H "Content-Type: application/json" -d '{"value": 123}'
|
curl -X POST https://api.photowall.com/order-rows/1/pwinty_image_id -H "Content-Type: application/json" -d '{"value": 123}'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Send a notification that the order-row has been delivered
|
## Send a notification that the order-row has been delivered
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -X POST https://api2.photowall.com/order-rows/1/send'
|
curl -X POST https://api.photowall.com/order-rows/1/send'
|
||||||
```
|
```
|
||||||
|
|||||||
+8
-8
@@ -17,7 +17,7 @@ Calculate price inc VAT of a wallpaper product. The response will contain prices
|
|||||||
|
|
||||||
Sample request
|
Sample request
|
||||||
|
|
||||||
`curl -X GET 'https://api2.photowall.com/prices/wallpaper?width=200&height=200&territory=SE&dealerurl=ackes&product=43894'`
|
`curl -X GET 'https://api.photowall.com/prices/wallpaper?width=200&height=200&territory=SE&dealerurl=ackes&product=43894'`
|
||||||
|
|
||||||
Sample response
|
Sample response
|
||||||
```
|
```
|
||||||
@@ -58,7 +58,7 @@ Calculate price inc VAT of a canvas product. The response will contain informati
|
|||||||
|
|
||||||
Sample request
|
Sample request
|
||||||
|
|
||||||
`curl -X GET 'https://api2.photowall.com/prices/canvas?width=100&height=50&territory=PL`
|
`curl -X GET 'https://api.photowall.com/prices/canvas?width=100&height=50&territory=PL`
|
||||||
|
|
||||||
Sample response
|
Sample response
|
||||||
```
|
```
|
||||||
@@ -100,7 +100,7 @@ Calculate price inc VAT of a poster product. The response will contain prices fo
|
|||||||
|
|
||||||
Sample request
|
Sample request
|
||||||
|
|
||||||
`curl -X GET 'https://api2.photowall.com/prices/poster?width=50&height=30&territory=SE&product=46654`
|
`curl -X GET 'https://api.photowall.com/prices/poster?width=50&height=30&territory=SE&product=46654`
|
||||||
|
|
||||||
Sample response
|
Sample response
|
||||||
```
|
```
|
||||||
@@ -137,7 +137,7 @@ Calculate price inc VAT of a framed print product.
|
|||||||
|
|
||||||
Sample request
|
Sample request
|
||||||
|
|
||||||
`curl -X GET 'https://api2.photowall.com/prices/framed-print?sku=GLOBAL-CFP-12x12&territory=SE`
|
`curl -X GET 'https://api.photowall.com/prices/framed-print?sku=GLOBAL-CFP-12x12&territory=SE`
|
||||||
|
|
||||||
Sample response
|
Sample response
|
||||||
```
|
```
|
||||||
@@ -166,7 +166,7 @@ Calculate the price for the "do it yourself frame" (DIY). Note that width and he
|
|||||||
|
|
||||||
Sample request
|
Sample request
|
||||||
|
|
||||||
`curl -X GET 'https://api2.photowall.com/prices/diy-frame?width=150&height=150&territory=SE`
|
`curl -X GET 'https://api.photowall.com/prices/diy-frame?width=150&height=150&territory=SE`
|
||||||
|
|
||||||
Sample response
|
Sample response
|
||||||
```
|
```
|
||||||
@@ -194,7 +194,7 @@ Calculate the price for a poster hanger
|
|||||||
|
|
||||||
Sample request
|
Sample request
|
||||||
|
|
||||||
`curl -X GET 'https://api2.photowall.com/prices/poster-hanger?width=50&territory=SE`
|
`curl -X GET 'https://api.photowall.com/prices/poster-hanger?width=50&territory=SE`
|
||||||
|
|
||||||
Sample response
|
Sample response
|
||||||
```
|
```
|
||||||
@@ -222,7 +222,7 @@ The width and height stored on the inquiry will be used in the calculations by d
|
|||||||
|
|
||||||
Wallpaper inquiry - sample request
|
Wallpaper inquiry - sample request
|
||||||
|
|
||||||
`curl -X GET 'https://api2.photowall.com/prices/inquiry/41015`
|
`curl -X GET 'https://api.photowall.com/prices/inquiry/41015`
|
||||||
|
|
||||||
Sample response
|
Sample response
|
||||||
```
|
```
|
||||||
@@ -259,7 +259,7 @@ Sample response
|
|||||||
|
|
||||||
Canvas inquiry - sample request
|
Canvas inquiry - sample request
|
||||||
|
|
||||||
`curl -X GET 'https://api2.photowall.com/prices/inquiry/310999?width=500&height=150`
|
`curl -X GET 'https://api.photowall.com/prices/inquiry/310999?width=500&height=150`
|
||||||
|
|
||||||
Sample response
|
Sample response
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user