7575
7676 define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
7777
78- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
78+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
7979 $strResponse = $objClient->typeahead( [ 'q' => 'startup', 'show_podcasts' => '1' ] );
8080 $arrHeaders = $objClient->getHeaders();
8181
@@ -87,17 +87,17 @@ try {
8787 print("\n=== Response data ===\n");
8888 print_r( json_decode( $strResponse ) );
8989
90- } catch ( ListenNotes\PodcastApiClient \Exception\APIConnectionException $objException ) {
90+ } catch ( ListenNotes\PodcastApi \Exception\APIConnectionException $objException ) {
9191 print("Failed ot connect to Listen API servers");
92- } catch ( ListenNotes\PodcastApiClient \Exception\AuthenticationException $objException ) {
92+ } catch ( ListenNotes\PodcastApi \Exception\AuthenticationException $objException ) {
9393 print("Wrong api key, or your account has been suspended!");
94- } catch ( ListenNotes\PodcastApiClient \Exception\InvalidRequestException $objException ) {
94+ } catch ( ListenNotes\PodcastApi \Exception\InvalidRequestException $objException ) {
9595 print("Wrong parameters!");
96- } catch ( ListenNotes\PodcastApiClient \Exception\NotFoundException $objException ) {
96+ } catch ( ListenNotes\PodcastApi \Exception\NotFoundException $objException ) {
9797 print("Endpoint not exist or the podcast / episode not exist!");
98- } catch ( ListenNotes\PodcastApiClient \Exception\RateLimitException $objException ) {
98+ } catch ( ListenNotes\PodcastApi \Exception\RateLimitException $objException ) {
9999 print("You have reached your quota limit!");
100- } catch ( ListenNotes\PodcastApiClient \Exception\ListenApiException $objException ) {
100+ } catch ( ListenNotes\PodcastApi \Exception\ListenApiException $objException ) {
101101 print("Something wrong on Listen Notes servers");
102102} catch ( Exception $e ) {
103103 print("Other errors that may not be related to Listen API");
@@ -128,7 +128,6 @@ And you can see some sample code [here](https://github.com/ListenNotes/podcast-a
128128
129129
130130
131-
132131## API Reference
133132
134133Each function is a wrapper to send an HTTP request to the corresponding endpoint on the
@@ -156,7 +155,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
156155
157156define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
158157
159- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
158+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
160159
161160$strResponse = $objClient->search( [ 'q' => 'startup' ] );
162161print_r( json_decode( $strResponse ) );
@@ -993,7 +992,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
993992
994993define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
995994
996- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
995+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
997996
998997$strResponse = $objClient->typeahead( [ 'q' => 'startup', 'show_podcasts' => '1' ] );
999998print_r( json_decode( $strResponse ) );
@@ -1202,7 +1201,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
12021201
12031202define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
12041203
1205- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
1204+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
12061205
12071206$strResponse = $objClient->getPodcastById( [ 'id' => '4d3fe717742d4963a85562e9f84d8c79' ] );
12081207print_r( json_decode( $strResponse ) );
@@ -1755,7 +1754,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
17551754
17561755define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
17571756
1758- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
1757+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
17591758
17601759$strResponse = $objClient->fetchEpisodeById( [ 'id' => '6b6d65930c5a4f71b254465871fed370',
17611760 'show_transcript' => '1' ] );
@@ -2161,7 +2160,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
21612160
21622161define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
21632162
2164- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
2163+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
21652164
21662165$strResponse = $objClient->fetchPodcastLanguages();
21672166print_r( json_decode( $strResponse ) );
@@ -2332,7 +2331,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
23322331
23332332define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
23342333
2335- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
2334+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
23362335
23372336$strResponse = $objClient->fetchPodcastGenres( [ 'top_level_only' => '1' ] );
23382337print_r( json_decode( $strResponse ) );
@@ -2523,7 +2522,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
25232522
25242523define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
25252524
2526- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
2525+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
25272526
25282527$strResponse = $objClient->fetchBestPodcasts( [ 'genre_id' => '93', 'page' => '2' ] );
25292528print_r( json_decode( $strResponse ) );
@@ -3843,7 +3842,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
38433842
38443843define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
38453844
3846- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
3845+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
38473846
38483847$strResponse = $objClient->fetchPodcastRegions();
38493848print_r( json_decode( $strResponse ) );
@@ -4058,7 +4057,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
40584057
40594058define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
40604059
4061- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
4060+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
40624061
40634062$strResponse = $objClient->fetchRecommendationsForPodcast(
40644063 [ 'id' => '25212ac3c53240a880dd5032e547047b', 'safe_mode' => 1 ] );
@@ -4734,7 +4733,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
47344733
47354734define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
47364735
4737- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
4736+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
47384737
47394738$strResponse = $objClient->fetchRecommendationsForEpisode(
47404739 [ 'id' => '914a9deafa5340eeaa2859c77f275799', 'safe_mode' => 1 ] );
@@ -5118,7 +5117,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
51185117
51195118define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
51205119
5121- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
5120+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
51225121
51235122$strResponse = $objClient->batchFetchEpisodes( [
51245123 'ids' => 'c577d55b2b2b483c969fae3ceb58e362,0f34a9099579490993eec9e8c8cebb82' ] );
@@ -5349,7 +5348,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
53495348
53505349define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
53515350
5352- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
5351+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
53535352
53545353$strResponse = $objClient->batchFetchPodcasts( [
53555354 'ids' => '3302bc71139541baa46ecb27dbf6071a,68faf62be97149c280ebcc25178aa731,9cf19c590ff0484d97b18b329fed0c6a' ] );
@@ -6531,7 +6530,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
65316530
65326531define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
65336532
6534- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
6533+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
65356534
65366535$strResponse = $objClient->justListen();
65376536print_r( json_decode( $strResponse ) );
@@ -6718,7 +6717,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
67186717
67196718define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
67206719
6721- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
6720+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
67226721
67236722$strResponse = $objClient->fetchCuratedPodcastsListById( [ 'id' => 'SDFKduyJ47r' ] );
67246723print_r( json_decode( $strResponse ) );
@@ -7819,7 +7818,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
78197818
78207819define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
78217820
7822- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
7821+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
78237822
78247823$strResponse = $objClient->fetchCuratedPodcastsLists( [ 'page' => 2 ] );
78257824print_r( json_decode( $strResponse ) );
@@ -9249,7 +9248,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
92499248
92509249define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
92519250
9252- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
9251+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
92539252
92549253$strResponse = $objClient->submitPodcast( [ 'rss' => 'https://feeds.megaphone.fm/committed' ] );
92559254print_r( json_decode( $strResponse ) );
@@ -9370,7 +9369,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
93709369
93719370define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
93729371
9373- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
9372+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
93749373
93759374$strResponse = $objClient->deletePodcast( [ 'id' => '4d3fe717742d4963a85562e9f84d8c79' ] );
93769375print_r( json_decode( $strResponse ) );
@@ -9442,7 +9441,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
94429441
94439442define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
94449443
9445- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
9444+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
94469445
94479446$strResponse = $objClient->fetchPlaylistById( [ 'id' => 'm1pe7z60bsw', 'type' ='podcast_list' ] );
94489447print_r( json_decode( $strResponse ) );
@@ -10637,7 +10636,7 @@ require_once dirname( __FILE__ ) . '/vendor/autoload.php';
1063710636
1063810637define( 'API_KEY', ( getenv( 'API_KEY' ) ? getenv( 'API_KEY' ) : null ) );
1063910638
10640- $objClient = new ListenNotes\PodcastApiClient\PodcastApiClient ( API_KEY );
10639+ $objClient = new ListenNotes\PodcastApi\Client ( API_KEY );
1064110640
1064210641$strResponse = $objClient->fetchMyPlaylists( [ 'page' => '1', 'sort' ='name_a_to_z' ] );
1064310642print_r( json_decode( $strResponse ) );
@@ -10798,3 +10797,6 @@ See all available parameters on the [API Docs page](https://www.listennotes.com/
1079810797}
1079910798```
1080010799</details>
10800+
10801+
10802+
0 commit comments