From b40ce84fd04124f6155543d901fe5170fb662b2c Mon Sep 17 00:00:00 2001 From: "Vassilis A. Alexiou" Date: Tue, 27 Jul 2021 12:41:03 +0300 Subject: [PATCH] get video info via post request using innertube api key #545 get video info via post request using innertube api key #545 --- XCDYouTubeKit/XCDYouTubeClient.m | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/XCDYouTubeKit/XCDYouTubeClient.m b/XCDYouTubeKit/XCDYouTubeClient.m index 5305d1ae..2ae8e2bd 100644 --- a/XCDYouTubeKit/XCDYouTubeClient.m +++ b/XCDYouTubeKit/XCDYouTubeClient.m @@ -14,6 +14,8 @@ @implementation XCDYouTubeClient @synthesize languageIdentifier = _languageIdentifier; +static NSString * _innertubeApiKey = @"AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"; + + (instancetype) defaultClient { static XCDYouTubeClient *defaultClient; @@ -29,6 +31,15 @@ - (instancetype) init return [self initWithLanguageIdentifier:nil]; } + ++ (NSString *)innertubeApiKey { + return _innertubeApiKey; +} + ++ (void)setInnertubeApiKey:(NSString *)key { + _innertubeApiKey = key; +} + - (instancetype) initWithLanguageIdentifier:(NSString *)languageIdentifier { if (!(self = [super init]))