Other

post
Post Data

https://api.feynlab.io/user/projects/:id/devices/:id/data
This endpoint allows you to get free cakes.
Request
Response
Path Parameters
id
optional
string
ID of the both project and device.
Headers
Authentication
required
string
Authentication token to track down who is emptying our stocks.
Query Parameters
recipe
optional
string
The API will do its best to find a cake matching the provided recipe.
gluten
optional
boolean
Whether the cake should be gluten-free or not.
200: OK
Cake successfully retrieved.
{
"name": "Cake's name",
"recipe": "Cake's recipe name",
"cake": "Binary cake"
}
404: Not Found
Could not find a cake matching this query.
{
"message": "Ain't no cake like that."
}

Examples

Node.Js
Ruby
Python
Go
// Set your secret key
const stripe = require('stripe')('sk_test_BQokikJOvBiI2HlWgH4olfQ2');
// Get the payment token ID submitted by the form:
const token = request.body.stripeToken;
const charge = stripe.charges.create({
amount: 999,
currency: 'usd',
description: 'Example charge',
source: token,
});
# Set your secret key
Stripe.api_key = 'sk_test_BQokikJOvBiI2HlWgH4olfQ2'
# Get the payment token ID submitted by the form:
token = params[:stripeToken]
charge = Stripe::Charge.create({
amount: 999,
currency: 'usd',
description: 'Example charge',
source: token,
})
# Set your secret key
stripe.api_key = 'sk_test_BQokikJOvBiI2HlWgH4olfQ2'
# Get the payment token ID submitted by the form:
token = request.form['stripeToken']
charge = stripe.Charge.create(
amount=999,
currency='usd',
description='Example charge',
source=token,
)
// Set your secret key
stripe.Key = 'sk_test_BQokikJOvBiI2HlWgH4olfQ2'
// Get the payment token ID submitted by the form:
token := r.FormValue('stripeToken')
params := &stripe.ChargeParams{
Amount: 999,
Currency: 'usd',
Description: 'Example charge',
}
params.SetSource(token)
ch, _ := charge.New(params)