Services_Scribd
[ class tree: Services_Scribd ] [ index: Services_Scribd ] [ all elements ]

Class: Services_Scribd_User

Source Location: /Services_Scribd-0.2.0/Services/Scribd/User.php

Class Overview

Services_Scribd
   |
   --Services_Scribd_Common
      |
      --Services_Scribd_User

The interface for the "user" API endpoint. Allows the user to create an account and login to different accounts.


Author(s):

Copyright:

  • 2009 Rich Schumacher <rich.schu@gmail.com>

Variables

Methods


Inherited Variables

Inherited Methods

Class: Services_Scribd_Common

Services_Scribd_Common::__construct()
Prevents calls from bubbling up to Serices_Scribd::_construct()
Services_Scribd_Common::call()
Builds, sends, and returns the response for an API request
Services_Scribd_Common::getAvailableEndpoints()
Returns an array of endpoints for this driver
Services_Scribd_Common::sendRequest()
Sends the request to the Scribd API
Services_Scribd_Common::setRequestAdapter()
Sets the request adapter to use for this request
Services_Scribd_Common::__call()
Traps any requests to endpoints that are not defined

Class: Services_Scribd

Services_Scribd::__construct()
Sets the API key and optional API secret
Services_Scribd::getAccount()
Returns the current account instance
Services_Scribd::setAccount()
Sets the Scribd account to use
Services_Scribd::__get()
Loads individual endpoint drivers

Class Details

[line 35]
The interface for the "user" API endpoint. Allows the user to create an account and login to different accounts.


[ Top ]


Class Variables

$validEndpoints = array(
        'getAutoSigninUrl',
        'login',
        'signup'
    )

[line 42]

Array of API endpoints that are supported
  • Access: public

Type:   array


[ Top ]



Method Detail

getAutoSigninUrl   [line 57]

string getAutoSigninUrl( [string $redirectUrl = '/'])

Returns a URL that, when visited, will automatically log a user in and then redirect to the URL provided

Parameters:

string   $redirectUrl   —  The URL to redirect to after logging in

[ Top ]

login   [line 75]

SimpleXMLElement login( string $username, string $password)

Signs in as an existing Scribd user and executes methods as that user

Parameters:

string   $username   —  The username or email address to login with
string   $password   —  Password of the account

[ Top ]

signup   [line 98]

SimpleXMLElement signup( string $username, string $password, [string $email = null], [string $name = null])

Creates a new Scribd account

Parameters:

string   $username   —  The username to create
string   $password   —  Password to set
string   $email   —  Email to use for this account
string   $name   —  The user's name

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:53:39 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.