defmodule TwitchApi.Streams.CreateStreamMarker do @moduledoc """ ⛔ This module is autogenerated please do not modify manually. ## Example request from twitch api docs: ### descriptions: This creates a marker at the current location in user 123’s stream. ### requests: curl -X POST 'https://api.twitch.tv/helix/streams/markers' -H'Authorization: Bearer cfabdegwdoklmawdzdo98xt2fo512y' -H'Client-Id: uo6dggojyb8d6soh92zknwmi5ej1q2' -H'Content-Type: application/json' -d'{"user_id":"123", "description":"hello, this is a marker!"}' ## Example response from twitch api docs: ### descriptions: ### responses: {"data":[{"id":123,"created_at":"2018-08-20T20:10:03Z","description":"hello, this is a marker!","position_seconds":244}]} """ alias TwitchApi.MyFinch alias TwitchApi.ApiJson.Template.Method.Headers @doc """ ### Description: Creates a marker in the stream of a user specified by user ID. A marker is an arbitrary point in a stream that the broadcaster wants to mark. ### Required authentication: OAuth token required Required scope: channel:manage:broadcast ### Required authorization: """ # Map containing the user needed information for the user OAuth access token fetch @type user_info :: %{user_id: integer | binary} | %{user_name: binary} # ID of the broadcaster in whose live stream the marker is created. @spec call(%{required(:user_id) => String.t()} | nil, user_info) :: {:ok, Finch.Response.t()} | {:error, Exception.t()} def call(body_params, user_info) do MyFinch.request( "POST", "https://api.twitch.tv/helix/streams/markers", Headers.config_oauth_headers(user_info), body_params ) end end