Skip to content

Instantly share code, notes, and snippets.

View bhatti's full-sized avatar

Shahzad Bhatti bhatti

View GitHub Profile
docker pull plexobject/api-mock-service:latest
docker run -p 8000:8080 -p 8081:8081 -e HTTP_PORT=8080 PROXY_PORT=8081 -e DATA_DIR=/tmp/mocks \
-e ASSET_DIR=/tmp/assets plexobject/api-mock-service:latest
"Amount": {{JSONFileProperty "props.yaml" "amount"}},
"Amount": {{JSONFileProperty "props.yaml" "amount"}},
export http_proxy="http://localhost:8081"
export https_proxy="http://localhost:8081"
curl -k -v -H "Authorization: Bearer sk_test_xxxx" \
https://api.stripe.com/v1/customers/cus_xxx/cash_balance
@bhatti
bhatti / m4.yaml
Last active November 2, 2022 18:19
method: GET
name: recorded-v1-customers-cus
path: /v1/customers/cus_**/cash_balance
description: recorded at 2022-10-29 04:26:17.24776 +0000 UTC
request:
match_query_params: {}
match_headers: {}
match_content_type: ""
match_contents: ""
example_path_params: {}
{
"/_scenarios/GET/FetchCredentialAws-8b2fcf02dfb7dc190fb735a469e1bbaa3ccb5fd1a24726976d110374b13403c6/v1/Credentials/AWS/{Sid}": {
"method": "GET",
"name": "FetchCredentialAws-8b2fcf02dfb7dc190fb735a469e1bbaa3ccb5fd1a24726976d110374b13403c6",
"path": "/v1/Credentials/AWS/{Sid}",
"match_query_params": {},
"match_headers": {},
"match_content_type": "",
"match_contents": "",
"LastUsageTime": 0,
curl -v http://localhost:8080/_scenarios
{
"account_sid": "ACF3A7ea7f5c90f6482CEcA77BED07Fb91",
"auth_token": "PaC7rKdGER73rXNi6rVKZMN1Jw0QYxPFeEkqyvnM7Ojw2nziOER7SMWkIV6N2hXYTKxAfDMfS9t0",
"date_created": "2022-10-29T11:54:46-07:00",
"date_updated": "2022-10-29T11:54:46-07:00",
"url": "https://Billy.com"
}
curl -v -X POST http://localhost:8080/v1/AuthTokens/Promote
@bhatti
bhatti / m31.yaml
Last active November 2, 2022 18:25
name: UpdateAuthTokenPromotion-xx
path: /v1/AuthTokens/Promote
description: Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old primary Auth Token will result in an error.
request:
match_query_params: {}
match_headers: {}
match_content_type: ""
match_contents: ""
example_path_params: {}
example_query_params: {}