Skip to content

Commit 00ffc8c

Browse files
committed
Create String version of the 'sendGet' command
1 parent 52d2fa3 commit 00ffc8c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/YoutubeApi.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ int YoutubeApi::sendGetToYoutube(const char *command) {
7070
return statusCode;
7171
}
7272

73+
int YoutubeApi::sendGetToYoutube(const String& command) {
74+
return sendGetToYoutube(command.c_str());
75+
}
76+
7377
bool YoutubeApi::getChannelStatistics(const char *channelId) {
7478
char command[150] = YTAPI_CHANNEL_ENDPOINT;
7579
char params[120];

src/YoutubeApi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class YoutubeApi
5151
YoutubeApi(const char *key, Client &client);
5252
YoutubeApi(const String& apiKey, Client& client);
5353
int sendGetToYoutube(const char *command);
54+
int sendGetToYoutube(const String& command);
5455
bool getChannelStatistics(const char *channelId);
5556
bool getChannelStatistics(const String& channelId);
5657
channelStatistics channelStats;

0 commit comments

Comments
 (0)