isenselabs / opencartapi Goto Github PK
View Code? Open in Web Editor NEWA small library which talks to OpenCart through its REST API
A small library which talks to OpenCart through its REST API
Is there any documentation or demo how to use this or call from another site using curl ?
Is there a reason to do this?
I will list changes as I pass by them in my development if needed. Might take a while.
password
changed to key
.cookie
changed to token
.Wondered what you thought about this. For example, I extended the OpenCart API on a few installations to include various additional functions based on our needs like 'order/get' (which fetches details of an order).
Might be nice to have a custom function for non-standard API endpoints. For example:
public function custom($url = null, $postData = array()) {
if (empty($url)) throw new InvalidDataException("URL cannot be empty for Order->custom()");
if (!is_array($postData) throw new InvalidDataException("postData must be an associative array for Order->custom()");
if (empty($postData['order_id']) throw new InvalidDataException("postData['order_id'] is required for for Order->custom()");
$this->curl->setUrl($this->oc->getUrl($url.'&order_id='.$postData['order_id']));
$this->curl->setData($postData);
$this->curl->makeRequest();
return $this->curl->getResponse();
}
You may find this a bit of a rare use-case but it could be useful if OpenCart adds additional endpoints that people need and these bindings aren't updated immediately. Gives us a fallback.
I'd be happy to submit a pull request for this if you're interested.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.