Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: support for _config #49

Closed
asherber opened this issue Jul 12, 2018 · 1 comment
Closed

Feature request: support for _config #49

asherber opened this issue Jul 12, 2018 · 1 comment

Comments

@asherber
Copy link

asherber commented Jul 12, 2018

The SmugMug API supports an advanced syntax for expansions using a _config parameter, documented at https://api.smugmug.com/api/v2/doc/advanced/config.html

Currently, I can make use of this in phpSmug by creating the appropriate array and then encoding it myself:

$advanced = [
    'filter' => [ 'Name', 'Description' ],
    'filteruri' => [ 'HighlightImage' ],
    'expand' => [
        'HighlightImage' => [
            'filter' => [ 'ThumbnailUrl' ],
            'filteruri' => []
        ]
    ]
];

$request_options = [
    '_expandmethod' => 'inline',
    '_config' => json_encode($advanced)
];

$client->get('user/me!albums', $request_options);

It would be nice if phpSmug recognized the _config key in an $options array and performed the JSON encoding automatically.

@lildude
Copy link
Owner

lildude commented Jul 13, 2018

Seems reasonable enough. Will take a look when I do the other expansions stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants