diff options
author | George Hazan <george.hazan@gmail.com> | 2023-08-01 17:00:31 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-08-01 17:00:36 +0300 |
commit | f3350f5b892a4809faf0703e81cc865190572648 (patch) | |
tree | 2c66a540befa58e1496c178b1338a5c20f18cd65 /protocols/Twitter/src | |
parent | fe58b618297fcd01fdfcd42fa93ba10ead8c336c (diff) |
NewStory: translateable default value
Diffstat (limited to 'protocols/Twitter/src')
-rw-r--r-- | protocols/Twitter/src/connection.cpp | 2 | ||||
-rw-r--r-- | protocols/Twitter/src/http.h | 2 | ||||
-rw-r--r-- | protocols/Twitter/src/utility.cpp | 2 |
3 files changed, 2 insertions, 4 deletions
diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp index 50d9fd6ad0..bb3d36c620 100644 --- a/protocols/Twitter/src/connection.cpp +++ b/protocols/Twitter/src/connection.cpp @@ -348,7 +348,7 @@ void CTwitterProto::UpdateAvatar(MCONTACT hContact, const CMStringA &url, bool f void CTwitterProto::UpdateFriends()
{
- auto *req = new AsyncHttpRequest(REQUEST_GET, "/friends/list.json");
+ auto *req = new AsyncHttpRequest(REQUEST_GET, CMStringA(FORMAT, "/2/users/%s/followers", m_szMyId.c_str()));
http::response resp = Execute(req);
if (resp.code != 200) {
debugLogA("Friend list reading failed");
diff --git a/protocols/Twitter/src/http.h b/protocols/Twitter/src/http.h index db0f2204b0..dc5c5debed 100644 --- a/protocols/Twitter/src/http.h +++ b/protocols/Twitter/src/http.h @@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once
-#define TWITTER_BASE_URL "https://api.twitter.com/1.1"
-
namespace http
{
struct response
diff --git a/protocols/Twitter/src/utility.cpp b/protocols/Twitter/src/utility.cpp index 06b8c10c65..3d380b85a8 100644 --- a/protocols/Twitter/src/utility.cpp +++ b/protocols/Twitter/src/utility.cpp @@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. http::response CTwitterProto::Execute(AsyncHttpRequest *pReq)
{
if (pReq->m_szUrl[0] == '/')
- pReq->m_szUrl.Insert(0, TWITTER_BASE_URL);
+ pReq->m_szUrl.Insert(0, "https://api.twitter.com/2");
bool bIsJson = false;
if (!pReq->m_szParam.IsEmpty()) {
|