Skip to content

Commit d6ff1e0

Browse files
committed
Token: changed access_token call to static
1 parent 2f00c23 commit d6ff1e0

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

lib/Be/Api.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public function getUserFollowers( $id_or_username, $options = array(), $assoc =
309309
$endpoint = self::ENDPOINT_USERS . '/' . $id_or_username . '/followers';
310310

311311
if ( !empty( $this->_access_token ) )
312-
$options[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
312+
$options[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
313313

314314
$results = $this->_getDecodedJson( $endpoint, $options, 'followers', $assoc );
315315

@@ -380,7 +380,7 @@ public function createUserWip( $image_path, $title, array $tags, $description =
380380

381381
$endpoint = self::ENDPOINT_WIPS;
382382

383-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
383+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
384384

385385
$post_body['tags'] = implode( '|', $tags );
386386
$post_body['image'] = '@' . $image_path;
@@ -414,7 +414,7 @@ public function createUserWipRevision( $wip_id, $image_path, $title, array $tags
414414

415415
$endpoint = self::ENDPOINT_WIPS . '/' . $id;
416416

417-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
417+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
418418

419419
$post_body['tags'] = implode( '|', $tags );
420420
$post_body['image'] = '@' . $image_path;
@@ -446,7 +446,7 @@ public function updateUserWipRevisionDescription( $wip_id, $revision_id, $descri
446446

447447
$endpoint = self::ENDPOINT_WIPS . '/' . $wip_id . '/' . $revision_id;
448448

449-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
449+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
450450

451451
$put_body['description'] = $description;
452452

@@ -471,7 +471,7 @@ public function updateUserWipTitle( $wip_id, $title, $assoc = false ) {
471471

472472
$endpoint = self::ENDPOINT_WIPS . '/' . $wip_id ;
473473

474-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
474+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
475475

476476
$put_body['title'] = $title;
477477

@@ -497,7 +497,7 @@ public function updateUserWipRevisionTags( $wip_id, $revision_id, array $tags, $
497497

498498
$endpoint = self::ENDPOINT_WIPS . '/' . $wip_id . '/' . $revision_id;
499499

500-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
500+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
501501

502502
$put_body['tags'] = implode( '|', $tags );
503503

@@ -523,7 +523,7 @@ public function postWipComment( $wip_id, $revision_id, $comment, $assoc = false
523523

524524
$endpoint = self::ENDPOINT_WIPS . '/' . $id . '/' . $revision_id . '/comments';
525525

526-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
526+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
527527
$body_params['comment'] = $comment;
528528

529529
$response = $this->_post( $endpoint, $query_params, $body_params );
@@ -547,7 +547,7 @@ public function deleteUserWipRevision( $wip_id, $revision_id, $assoc = false ) {
547547

548548
$endpoint = self::ENDPOINT_WIPS . '/' . $wip_id . '/' . $revision_id;
549549

550-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
550+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
551551

552552
$response = $this->_delete( $endpoint, $query_params );
553553

@@ -569,7 +569,7 @@ public function deleteUserWip( $wip_id, $assoc = false ) {
569569

570570
$endpoint = self::ENDPOINT_WIPS . '/' . $wip_id ;
571571

572-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
572+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
573573

574574
$response = $this->_delete( $endpoint, $query_params );
575575

@@ -592,7 +592,7 @@ public function getUserActivity( $offset_ts = false, $assoc = false ) {
592592
$endpoint = self::ENDPOINT_ACTIVITY ;
593593

594594
$params['offset_ts'] = $offset_ts;
595-
$params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
595+
$params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
596596

597597
$results = $this->_getDecodedJson( $endpoint, $params, 'activity', $assoc );
598598

@@ -658,7 +658,7 @@ public function createCollection( $title, $project_ids = array(), $assoc = false
658658

659659
$endpoint = self::ENDPOINT_COLLECTIONS;
660660

661-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
661+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
662662
$body_params['title'] = $title;
663663

664664
if ( !empty( $project_ids ) )
@@ -685,7 +685,7 @@ public function deleteCollection( $id, $assoc = false ) {
685685

686686
$endpoint = self::ENDPOINT_COLLECTIONS . '/' . $id;
687687

688-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
688+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
689689

690690
$response = $this->_delete( $endpoint, $query_params );
691691

@@ -708,7 +708,7 @@ public function updateCollection( $id, $title, $assoc = false ) {
708708

709709
$endpoint = self::ENDPOINT_COLLECTIONS . '/' . $id;
710710

711-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
711+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
712712
$body_params['title'] = $title;
713713

714714
$response = $this->_put( $endpoint, $query_params, $body_params );
@@ -755,7 +755,7 @@ public function addProjectsToCollection( $id, array $project_ids, $assoc = false
755755

756756
$projects = implode( '|', $project_ids );
757757

758-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
758+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
759759

760760
$body_params['projects'] = $projects;
761761

@@ -781,7 +781,7 @@ public function removeProjectFromCollection( $id, $project_id, $assoc = false )
781781

782782
$endpoint = self::ENDPOINT_COLLECTIONS . '/' . $id . '/projects/' . $project_id;
783783

784-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
784+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
785785

786786
$response = $this->_delete( $endpoint, $query_params );
787787

@@ -847,7 +847,7 @@ public function viewProject( $id, $assoc = false ) {
847847

848848
$endpoint = self::ENDPOINT_PROJECTS . '/' . $id . '/view';
849849

850-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
850+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
851851

852852
$response = $this->_post( $endpoint, $query_params );
853853

@@ -869,7 +869,7 @@ public function appreciateProject( $id, $assoc = false ) {
869869

870870
$endpoint = self::ENDPOINT_PROJECTS . '/' . $id . '/appreciate';
871871

872-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
872+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
873873

874874
$response = $this->_post( $endpoint, $query_params );
875875

@@ -892,7 +892,7 @@ public function postProjectComment( $id, $comment, $assoc = false ) {
892892

893893
$endpoint = self::ENDPOINT_PROJECTS . '/' . $id . '/comments';
894894

895-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
895+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
896896
$body_params['comment'] = $comment;
897897

898898
$response = $this->_post( $endpoint, $query_params, $body_params );
@@ -915,7 +915,7 @@ public function followCollection( $id, $assoc = false ) {
915915

916916
$endpoint = self::ENDPOINT_COLLECTIONS . '/' . $id . '/follow';
917917

918-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
918+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
919919

920920
$response = $this->_post( $endpoint, $query_params );
921921

@@ -937,7 +937,7 @@ public function unfollowCollection( $id, $assoc = false ) {
937937

938938
$endpoint = self::ENDPOINT_COLLECTIONS . '/' . $id . '/follow';
939939

940-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
940+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
941941

942942
$response = $this->_delete( $endpoint, $query_params );
943943

@@ -1043,7 +1043,7 @@ public function followUser( $id_or_username, $assoc = false ) {
10431043

10441044
$endpoint = self::ENDPOINT_USERS . "/{$id_or_username}/follow";
10451045

1046-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
1046+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
10471047

10481048
$response = $this->_post( $endpoint, $query_params );
10491049

@@ -1065,7 +1065,7 @@ public function unfollowUser( $id_or_username, $assoc = false ) {
10651065

10661066
$endpoint = self::ENDPOINT_USERS . "/{$id_or_username}/follow";
10671067

1068-
$query_params[ self::ACCESS_TOKEN_KEY ] = $this->_access_token;
1068+
$query_params[ static::ACCESS_TOKEN_KEY ] = $this->_access_token;
10691069

10701070
$response = $this->_delete( $endpoint, $query_params );
10711071

0 commit comments

Comments
 (0)