GithubHelp home page GithubHelp logo

hapihp's Introduction

hapihp's People

Contributors

adamschwartz avatar adrianmott avatar ajorgensen avatar axiak avatar dcancel avatar jprado avatar therealbensmith avatar thinkclay avatar zackbloom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hapihp's Issues

no oauth token support - only hapikey

If you trace the code, you'll see it ultimately makes a call like <some_api_url>?hapikey=demo when under some circumstances you really should be doing something like <some_api_url>?access_token=demo

demo code below.

<?php
require_once('lib/haPiHP/class.leads.php');
require_once('lib/haPiHP/class.contacts.php');

$HAPIKey = 'demo';


/* Lead Form Example */
$api_endpoint = "http://demo.app1.hubspot.com/?app=leaddirector&FormName=WebstoreOrders";
$leads = new HubSpot_Leads($HAPIKey);

$val = array( 'email' => 'testemail+'.uniqid().'@emailtest.com', 
              'last_order_datetime' => "Mon Jan 21 15:48:31 EST 2013",
              'last_order_date' => "2013.01.21",
              'last_order_time' => "15:48",
              'last_order_number' => "123",
              'last_order_amount' => "15.99" );

echo $leads->add_lead($api_endpoint, $val) . "\n";




/* Contact API Example */
$contacts = new HubSpot_Contacts($HAPIKey);
$unique_email = 'testemail+'.uniqid().'@emailtest.com';
$params =  array('email' => $unique_email, 'firstname' => 'Webster' );
$createdContact = $contacts->create_contact($params);
print_r($createdContact);

?>

Support for OAuth2.0?

Seems a little silly that the "official" API library doesn't support oAuth 2.0 :-\

Namespacing

Because the library is not namespaced, either in the 5.3 way or with an underscored prefix, using it with other OO PHP code/libraries carries all sorts potential issues with regards to redeclaring classes etc.

I would highly suggest renaming all classes to HS* at a minimum; perhaps HubSpot_*

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.