GitXplorerGitXplorer
b

smugmug

public
6 stars
0 forks
2 issues

Commits

List of commits on branch main.
Verified
7c98025b7d427e2276b5182e2610746cafb3c8b5

Merge pull request #56 from bzimmer/golang-version

bbzimmer committed 8 months ago
Unverified
8041d58bcae31a6de4c09d723024f75d334e8cab

bump golang patch version

bbzimmer committed 8 months ago
Verified
89f7ed618dd15bfdf1b16c1c5d78637b1dfcde4d

updated dependencies (#55)

bbzimmer committed 8 months ago
Verified
24bd25f8fb147d6e4367a6fdc9aeb0a4d418c3d3

updated actions (#54)

bbzimmer committed 2 years ago
Verified
ae5c38e3f97f88567f1690731f494514fc5913e2

improved gh actions (#53)

bbzimmer committed 2 years ago
Verified
0b6ad30fa1ed75783db320c5a5d19ab7f35108c0

Merge pull request #52 from bzimmer/GO-2022-1059

bbzimmer committed 2 years ago

README

The README file for this repository.

smugmug

build codecov

A functional approach to the SmugMug API.

Design Philosophy

The design of this library (smugmug) is to separate the interactions with the SmugMug API as much as possible from the handling of the results. smugmug provides both low-level connectivity as well as higher-level abstractions for building applications. smugmug ships with no executable but a feature-rich application, ma, has been developed leveraging most of the library's APIs.

The APIs returning scalars and iterators are the most likely candidates for use but the lower-level functionality required to build the iterators, pages, is available if the need arises.

Expansions

A note on expansions. SmugMug's API provides an optimization to return some attributes of a request in a single call versus multiple. smugmug needs to explicitly support expansions and at this time not all are handled (though the primary use cases have been implemented). The expansions returning paged results will not be supported because it complicates the design and the number of results is limited so paging is almost always required anyway.

Singles

The methods User, Node, Album, and Image all return a single object by the primary key.

Pages

The plural methods of the above (eg, Nodes or Images) will return a page of results as well as the metadata required to page through all possible responses. These methods are provided as a building block for the iterators.

Iterators

The methods ending in Iter (eg, NodesIter or ImagesIter) use the paging methods to handle the iteration of all results and accept a typed callback function to provide a flexible mechanism for application-specific logic.

In addition to the Iter functions, the NodeService also supports iteration of parent and children nodes as well as providing Walk which allows the complete traversal of the node tree.