mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 17:47:26 +00:00
change youtube sync endpoint
This commit is contained in:
parent
c4f8fef151
commit
26f569f866
1 changed files with 9 additions and 12 deletions
15
lib/thirdparty/LBRY.class.php
vendored
15
lib/thirdparty/LBRY.class.php
vendored
|
@ -30,28 +30,25 @@ class LBRY
|
||||||
return Curl::post(static::getApiUrl('/list/unsubscribe'), ['email' => $email], ['json_response' => true]);
|
return Curl::post(static::getApiUrl('/list/unsubscribe'), ['email' => $email], ['json_response' => true]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register new youtube sync
|
|
||||||
public static function newYoutube($email, $channel_id, $channel_name)
|
|
||||||
{
|
|
||||||
return Curl::post(static::getApiUrl('/yt/new'), ['email' => $email, 'youtube_channel_id' => $channel_id,'desired_lbry_channel_name' => $channel_name], ['json_response' => true]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function connectYoutube($channel_name)
|
public static function connectYoutube($channel_name)
|
||||||
{
|
{
|
||||||
$type = 'sync';
|
$type = 'sync';
|
||||||
return Curl::post(static::getApiUrl('/yt/connect'), ['desired_lbry_channel_name' => $channel_name, 'type' => $type], ['json_response' => true]);
|
return Curl::post(static::getApiUrl('/yt/new'), ['desired_lbry_channel_name' => $channel_name, 'type' => $type], ['json_response' => true]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check the sync status
|
// Check the sync status
|
||||||
public static function statusYoutube($status_token)
|
public static function statusYoutube($status_token)
|
||||||
{
|
{
|
||||||
return Curl::post(static::getApiUrl('/yt/status'), ['status_token' => $status_token], ['json_response' => true]);
|
return Curl::post(static::getApiUrl('/yt/status'), ['status_token' => $status_token], ['json_response' => true]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function youtubeReward(){
|
public static function youtubeReward()
|
||||||
|
{
|
||||||
return CurlWithCache::post(static::getApiUrl('/yt/rewards'), [], ['cache' => 3600, 'json_response' => true]);
|
return CurlWithCache::post(static::getApiUrl('/yt/rewards'), [], ['cache' => 3600, 'json_response' => true]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function editYouTube($status_token, $channel_name, $email, $sync_consent){
|
public static function editYouTube($status_token, $channel_name, $email, $sync_consent)
|
||||||
|
{
|
||||||
return Curl::post(static::getApiUrl("/yt/update"), ['status_token' => $status_token, 'new_email' => $email, 'new_preferred_channel' => $channel_name, 'sync_consent' => $sync_consent], ['json_response' => true]);
|
return Curl::post(static::getApiUrl("/yt/update"), ['status_token' => $status_token, 'new_email' => $email, 'new_preferred_channel' => $channel_name, 'sync_consent' => $sync_consent], ['json_response' => true]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue