Liking cljdoc? Tell your friends :D

hub.photo.client


captions-for-photosclj

(captions-for-photos photos user-id->full-name)

Inputs: [photos :- [ps/Photo] user-id->full-name :- {s/Str s/Str}] Returns: {ps/ID s/Str}

Takes in a collection of unhydrated photos (no :user-ids, just bibs). Returns a map of photo-id to caption string. A caption string for a photo with Tim and Dave might look like: 'Dave Petrovics (#12), Tim Hornsby (#32)'.

Inputs: [photos :- [ps/Photo] user-id->full-name :- {s/Str s/Str}]
Returns: {ps/ID s/Str}

Takes in a collection of unhydrated photos (no :user-ids, just
bibs). Returns a map of photo-id to caption string. A caption string
for a photo with Tim and Dave might look like: 'Dave
Petrovics (#12), Tim Hornsby (#32)'.
raw docstring

create!clj

(create! race-id photos)

Inputs: [race-id :- ps/RaceID photos :- [ps/PhotoInput]] Returns: (s/either [ps/ID] {:error s/Str})

Generates a bunch of photo instances for the supplied race off of the supplied photo URLs. Does not upload the photo to FB.

Inputs: [race-id :- ps/RaceID photos :- [ps/PhotoInput]]
Returns: (s/either [ps/ID] {:error s/Str})

Generates a bunch of photo instances for the supplied race off of
the supplied photo URLs. Does not upload the photo to FB.
raw docstring

delete!clj

(delete! photo-id)

Inputs: [photo-id :- ps/ID]

Deletes a photo from the photo table.

Inputs: [photo-id :- ps/ID]

Deletes a photo from the photo table.
raw docstring

delete-race-info!clj

(delete-race-info! race-id)

Inputs: [race-id :- s/Str]

Inputs: [race-id :- s/Str]
raw docstring

delete-race-photos!clj

(delete-race-photos! race-id)

Inputs: [race-id :- s/Str]

Deletes all photos for the given race. Does not delete the race info table.

Inputs: [race-id :- s/Str]

Deletes all photos for the given race. Does not delete the race info table.
raw docstring

geotag!clj

(geotag! id geotag)

Inputs: [id :- ps/ID geotag :- ps/GeoTag] Returns: (s/either ps/Photo ua/Err)

Applies the supplied geotag to the supplied photo.

Inputs: [id :- ps/ID geotag :- ps/GeoTag]
Returns: (s/either ps/Photo ua/Err)

Applies the supplied geotag to the supplied photo.
raw docstring

get-photoclj


get-race-infoclj

(get-race-info race-id)

Inputs: [race-id :- ps/RaceID] Returns: ps/RaceInfo

Inputs: [race-id :- ps/RaceID]
Returns: ps/RaceInfo
raw docstring

initialize-album!clj

(initialize-album! race-id location title fb-page-id access-token)

Inputs: [race-id :- ps/RaceID location :- (s/named s/Str "Race Location for FB Album") title :- (s/named s/Str "Race title for FB display.") fb-page-id :- s/Str access-token :- s/Str] Returns: (s/maybe ps/AlbumID)

Creates a Facebook album for the given race. If an album already exists, it will not create a new one or overwrite the previous one. If there are previous bib mappings, they will remain untouched.

Inputs: [race-id :- ps/RaceID location :- (s/named s/Str "Race Location for FB Album") title :- (s/named s/Str "Race title for FB display.") fb-page-id :- s/Str access-token :- s/Str]
Returns: (s/maybe ps/AlbumID)

Creates a Facebook album for the given race. If an album already
exists, it will not create a new one or overwrite the previous
one. If there are previous bib mappings, they will remain
untouched.
raw docstring

merge-users!clj

(merge-users! primary-id sub-id)

Inputs: [primary-id :- ps/UserID sub-id :- ps/UserID] Returns: (s/either s/Bool ua/Err)

Merges the sub-id user into the primary-id user. Returns the merged user. Errors if either user doesn't exist.

This can be used to merge full users, OR to merge pending users together or into full users. Can't merge full users into a pending user.

Inputs: [primary-id :- ps/UserID sub-id :- ps/UserID]
Returns: (s/either s/Bool ua/Err)

Merges the sub-id user into the primary-id user. Returns the merged
user. Errors if either user doesn't exist.

This can be used to merge full users, OR to merge pending users
together or into full users. Can't merge full users into a pending
user.
raw docstring

multigetclj

(multiget ids)

Inputs: [ids :- [ps/ID]] Returns: {ps/ID ps/Photo}

Multiget, same as it always works.

Inputs: [ids :- [ps/ID]]
Returns: {ps/ID ps/Photo}

Multiget, same as it always works.
raw docstring

photo-clientclj

(photo-client)
(photo-client opts)

Inputs: ([] [opts :- {:rethink {:mode (s/enum :test :live), :db s/Str, :spec RethinkSpec}}]) Returns: Lifecycle

Client for the photo service.

Inputs: ([] [opts :- {:rethink {:mode (s/enum :test :live), :db s/Str, :spec RethinkSpec}}])
Returns: Lifecycle

Client for the photo service.
raw docstring

photos-by-bibclj

(photos-by-bib race-id bib-id)

Inputs: [race-id :- ps/RaceID bib-id :- ps/Bib] Returns: [ps/Photo]

Accepts a race ID and a bib number and returns a sequence of photos for that bib number at that race.

Inputs: [race-id :- ps/RaceID bib-id :- ps/Bib]
Returns: [ps/Photo]

Accepts a race ID and a bib number and returns a sequence of photos
for that bib number at that race.
raw docstring

photos-by-racesclj

(photos-by-races race-ids)

Inputs: [race-ids :- [ps/RaceID]] Returns: {ps/RaceID [ps/Photo]}

Accepts a race ID and returns a sequence of photos for that race.

Inputs: [race-ids :- [ps/RaceID]]
Returns: {ps/RaceID [ps/Photo]}

Accepts a race ID and returns a sequence of photos for that race.
raw docstring

photos-by-userclj

(photos-by-user race-ids user-ids)

Inputs: [race-ids :- [ps/RaceID] user-ids :- #{ps/UserID}] Returns: {ps/RaceID [ps/Photo]}

Accepts a series of race IDs and a set of user IDs and returns a map of RaceID to a sequence of photos that any of the supplied users appear in (alongside the privacy level).

Inputs: [race-ids :- [ps/RaceID] user-ids :- #{ps/UserID}]
Returns: {ps/RaceID [ps/Photo]}

Accepts a series of race IDs and a set of user IDs and returns a
map of RaceID to a sequence of photos that any of the supplied users
appear in (alongside the privacy level).
raw docstring

register-bib-mapping!clj

(register-bib-mapping! race-id mapping)

Inputs: [race-id :- ps/RaceID mapping :- {ps/Bib {:user-id ps/UserID, (s/optional-key :default-privacy) ps/Privacy}}] Returns: s/Bool

For the supplied race ID, registers a mapping of bib number to user ID. Optionally set a default privacy for the user; if the user has a custom default privacy setting registered, the one supplied here will have no effect.

Inputs: [race-id :- ps/RaceID mapping :- {ps/Bib {:user-id ps/UserID, (s/optional-key :default-privacy) ps/Privacy}}]
Returns: s/Bool

For the supplied race ID, registers a mapping of bib number to user
ID. Optionally set a default privacy for the user; if the user has a
custom default privacy setting registered, the one supplied here
will have no effect.
raw docstring

set-facebook-id!clj

(set-facebook-id! m)

Inputs: [m :- {:user-id ps/UserID, :facebook-id s/Str}] Returns: s/Bool

Registers a default privacy setting for the specified user. All new photos tagged will show up with this privacy setting across ALL races.

Inputs: [m :- {:user-id ps/UserID, :facebook-id s/Str}]
Returns: s/Bool

Registers a default privacy setting for the specified user. All new
photos tagged will show up with this privacy setting across ALL
races.
raw docstring

set-privacy!clj

(set-privacy! m)

Inputs: [m :- {:user-id ps/UserID, :privacy-level ps/Privacy}] Returns: s/Bool

Registers a default privacy setting for the specified user. All new photos tagged will show up with this privacy setting across ALL races.

Inputs: [m :- {:user-id ps/UserID, :privacy-level ps/Privacy}]
Returns: s/Bool

Registers a default privacy setting for the specified user. All new
photos tagged will show up with this privacy setting across ALL
races.
raw docstring

set-user-info!clj

(set-user-info! user-id opts)

Inputs: [user-id :- ps/UserID opts :- {(s/optional-key :privacy-level) ps/Privacy, (s/optional-key :facebook-id) s/Str}] Returns: s/Bool

Registers privacy settings or facebook info for the specified user.

Inputs: [user-id :- ps/UserID opts :- {(s/optional-key :privacy-level) ps/Privacy, (s/optional-key :facebook-id) s/Str}]
Returns: s/Bool

Registers privacy settings or facebook info for the specified
user.
raw docstring

tag!clj

(tag! photo-id tags)

Inputs: [photo-id :- ps/ID tags :- [{:bib ps/Bib, (s/optional-key :x-offset) s/Num, (s/optional-key :y-offset) s/Num}]] Returns: (s/either ps/Photo ua/Err)

Marks a tag for the supplied photo ID. If you supply one of x-offset and y-offset, the default is zero.

Inputs: [photo-id :- ps/ID tags :- [{:bib ps/Bib, (s/optional-key :x-offset) s/Num, (s/optional-key :y-offset) s/Num}]]
Returns: (s/either ps/Photo ua/Err)

Marks a tag for the supplied photo ID. If you supply one of
  x-offset and y-offset, the default is zero.
raw docstring

upload-album-to-fb!clj

(upload-album-to-fb! race-id
                     cdn-prefix
                     user-id->full-name
                     fb-page-id
                     access-token)

Inputs: [race-id :- ps/RaceID cdn-prefix :- s/Str user-id->full-name :- {s/Str s/Str} fb-page-id :- s/Str access-token :- s/Str] Returns: s/Bool

Uploads all photos in the given album to Facebook. Call this after the album has already been initialized, and bib mappings are up to date. Call this with a user-id->full-name mapping so that captions can be uploaded with the photos.

Inputs: [race-id :- ps/RaceID cdn-prefix :- s/Str user-id->full-name :- {s/Str s/Str} fb-page-id :- s/Str access-token :- s/Str]
Returns: s/Bool

Uploads all photos in the given album to Facebook. Call this after
the album has already been initialized, and bib mappings are up to
date. Call this with a user-id->full-name mapping so that captions
can be uploaded with the photos.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close