Skip to content

Use the same instance API on multiple pages. #49

Description

@JoaoFelipePego

Is it possible to use the same API instance, storing it in some way?

I'm trying to store the int within _SESSION, but failed.

Will I have to log in to the API instance for each page?

$api = new \JKetelaar\fut\api\API(
    $creds[ 'username' ], $creds[ 'password' ], $creds[ 'secret' ], $creds[ 'key' ], $creds[ 'platform' ]
);
   
$api->login();
     
$_SESSION['API'] = $api;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions