Comments (4)
AHH sorry... that did work...
Now if we can just get SMUG to speed up their API... sheesh... a simple get 2 albums info takes 10 seconds to load. And i just want to display some pictures on a website.
I hear you
I'm gonna close this issue now as the initial issue is now resolved.
from phpsmug.
its doesnt like the encoded "+" symbol you are doing...
from phpsmug.
This is where phpSmug is making your life easy and assumes you have no knowledge about encoding the params as there is no documentation that manual encoding is required within the SmugMug API docs.
The API itself suggests manual encoding of options is not required so phpSmug passes this on to you and expects you to use the options exactly as they're returned by the API.
So in the case of ordering, the API supports the following (taken from the JSON from https://api.smugmug.com/api/v2/user/{username}!albums#json
):
"Parameters": {
"GET": [
{
"Name": "Order",
"Required": false,
"ReadOnly": false,
"Default": "",
"Description": "Order Albums By",
"Type": "Select",
"OPTIONS": [
"Album Settings",
"Position",
"Last Updated (Descending)",
"Last Updated (Ascending)",
"Date Added (Descending)",
"Date Added (Ascending)"
],
"MIN_COUNT": 1,
"MAX_COUNT": 1
},
{
"Name": "MinimumImages",
"Required": false,
"ReadOnly": false,
"Default": 0,
"Type": "Integer",
"MIN_VALUE": 0,
"MAX_VALUE": 16777215
}
]
},
From this output, you can see the ordering string is Date Added (Descending)
.
Use that exactly (I've removed default options)...
$albums = $client->get("user/{$username}!albums", array('count' => 2, 'Order'=>'Date Added (Descending)'));
... and you'll get the response you expect.
from phpsmug.
AHH sorry... that did work...
Now if we can just get SMUG to speed up their API... sheesh... a simple get 2 albums info takes 10 seconds to load. And i just want to display some pictures on a website.
Im probably going to have to just sync all the data to a database and have the front end query that database instead of SMUG API
from phpsmug.
Related Issues (20)
- Trying to access unlisted children of root node with phpSmug HOT 2
- Debugging 400 response HOT 2
- Undefined offset in Client.php __call() caused by empty URI arguments HOT 3
- Can't upload (from URI & from Local) HOT 2
- $callback url doesn't work! HOT 5
- Problems with phpSmug 3.5 and API 1.3 HOT 4
- Problems with expansions HOT 1
- Is this project abandoned? HOT 2
- Feature request: support for _config HOT 1
- Keywords not showing up? HOT 1
- setToken problems using own account credentials HOT 2
- 400 Error code creating album, please help. HOT 4
- list all folders HOT 3
- 404 returned just for our Smugmug site album list HOT 2
- Undefined Property / and Class 'phpSmug\Client' not found HOT 2
- Saving/Reusing the Token HOT 4
- nonce_used error when getting image information HOT 5
- Issue updating keywords HOT 2
- Access headers in response HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpsmug.