Zum Hauptinhalt springen

Submit your usage of the spotlight

POST/v2/users/self/spotlights/{spotlightId}
API-Version
v2
Request-Methode
POST
Operation-ID
user-spotlight-usage

Request​

  • spotlightIdstringrequired

Responses​

Kein Response-Inhalt angegeben.

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-X POST \
-d '{"acknowledged":true,"used":true}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/users/self/spotlights/string
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";

const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.user.spotlightUsage({
"spotlightId": "string",
"data": {
"acknowledged": true,
"used": true
}
});

assertStatus(response, 204);

use \Mittwald\ApiClient\Generated\V2\Clients\User\SpotlightUsage\SpotlightUsageRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\User\SpotlightUsage\SpotlightUsageRequestBody;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

// TODO: Please consult the properties and constructor signature of
// SpotlightUsageRequestBody to learn how to construct a valid instance
$body = new SpotlightUsageRequestBody(/* TODO: ... */);

$request = (new SpotlightUsageRequest(
spotlightId: "string",
body: $body
));
$response = $client->user()->spotlightUsage($request);

var_dump($response->getBody();

Auf dieser Seite