adjusting deprecated APIs

This commit is contained in:
Mark Beamer Jr 2018-10-20 12:04:26 -04:00
parent 917f1689bb
commit 66324c3f0e
No known key found for this signature in database
GPG key ID: 1C314FB89AD76973
2 changed files with 6 additions and 6 deletions

View file

@ -31,23 +31,23 @@ class LBRY
public static function editEmailSettings($token, $email, $isPrimary =null, $isEnabled = null)
{
return Curl::post(static::getApiUrl('/user/email/edit'), ['auth_token' => $token], ['email' => $email], ['is_primary' => $isPrimary], ['is_enabled' => $isEnabled]);
return Curl::post(static::getApiUrl('/user_email/edit'), ['auth_token' => $token], ['email' => $email], ['is_primary' => $isPrimary], ['is_enabled' => $isEnabled]);
}
public static function emailStatus($token)
{
list($status, $headers, $body) = Curl::doCurl(Curl::POST, static::getApiUrl('/user/email/status'),['auth_token' => $token], ['json_response' => true]);
list($status, $headers, $body) = Curl::doCurl(Curl::POST, static::getApiUrl('/user_email/status'), ['auth_token' => $token], ['json_response' => true]);
return array($status,$headers,$body);
}
public static function applyTags($type, $token, $tags)
{
return Curl::post(static::getApiUrl('/user/tag/edit'), ['auth_token' => $token], [$type => $tags]);
return Curl::post(static::getApiUrl('/user_tag/edit'), ['auth_token' => $token], [$type => $tags]);
}
public static function unsubscribe($email)
{
return Curl::post(static::getApiUrl('/list/unsubscribe'), ['email' => $email], ['json_response' => true]);
return Curl::post(static::getApiUrl('/user/unsubscribe'), ['email' => $email], ['json_response' => true]);
}
public static function connectYoutube($channel_name)

View file

@ -14,7 +14,7 @@ lbry.emailSettingsForm = function (formSelector, tags, userAuthToken) {
function submitEmail(e) {
var element = e.target,
url = 'https://api.lbry.io/user/email/edit?auth_token=' + userAuthToken
url = 'https://api.lbry.io/user_email/edit?auth_token=' + userAuthToken
+ "&email=" + element.value + "&enabled=" + element.checked.toString();
emailSection.find('.notice').hide();
@ -30,7 +30,7 @@ lbry.emailSettingsForm = function (formSelector, tags, userAuthToken) {
function submitTags() {
tagSection.find('.notice').hide();
var url = 'https://api.lbry.io/user/tag/edit?auth_token=' + userAuthToken,
var url = 'https://api.lbry.io/user_tag/edit?auth_token=' + userAuthToken,
addTags = [],
removeTags = [];