You are here

protected function Instagram::create_url in Drupagram 7

Same name and namespace in other branches
  1. 6 drupagram.lib.php \Instagram::create_url()
5 calls to Instagram::create_url()
Instagram::call in ./drupagram.lib.php
Method for calling any drupagram api resource
InstagramOAuth::get_access_token in ./drupagram.lib.php
Retrieves the access token.
InstagramOAuth::get_authenticate_url in ./drupagram.lib.php
Returns the properly formatted authentication url
InstagramOAuth::get_authorize_url in ./drupagram.lib.php
Returns the properly formatted authorization url.
InstagramOAuth::get_request_token in ./drupagram.lib.php
Requests token. Not implemented with Instagram yet.

File

./drupagram.lib.php, line 431
Classes to implement the full Instagram API

Class

Instagram
Primary Instagram API implementation class Supports the full REST API for drupagram.

Code

protected function create_url($path, $format = NULL) {
  if (is_null($format)) {
    $format = $this->format;
  }
  $conf = InstagramConf::instance();
  $url = $conf
    ->get('apibase') . '/' . $path;
  if (!empty($format)) {
    $url .= '.' . $this->format;
  }
  return $url;
}