new Account(opts)
Snapchat wrapper for account-related API calls.
Parameters:
| Name | Type | Description |
|---|---|---|
opts |
Object |
- Source:
Methods
-
downloadAvatar(username, cb)
-
Downloads the animated avatar for user. Currently encrypted, or something.
Parameters:
Name Type Description usernamestring The username tied to the avatar to download.
cbfunction - Source:
-
downloadSnaptag(cb)
-
Downloads your account's snaptag, a personal Snapchat QR code.
Parameters:
Name Type Description cbfunction - Source:
-
updateBestFriendsCount(number, cb)
-
Updates the number of best friends to display.
Parameters:
Name Type Description numbernumber A number from 3 to 7. Defaults to 3 and will max out at 7.
cbfunction - Source:
-
updateDisplayName(displayName, cb)
-
Updates your display name.
Your 'display name' is what your contact name defaults to when someone new adds you, not your username.
Parameters:
Name Type Description displayNamestring Your new display name.
cbfunction - Source:
-
updateEmail(address, cb)
-
Updates your account's email address.
Parameters:
Name Type Description addressstring Your new email address.
cbfunction - Source:
-
updateFeatureSettings(Object, cb)
-
Updates your account's feature settings.
See constants.Feature for valid keys. Invalid keys will be silently ignored.
Parameters:
Name Type Description Objectsettings A dictionary of string-boolean pairs. Missing keys-value pairs default to the current values. Behavior is undefined for values other than booleans.
cbfunction - Source:
-
updateNotificationSoundSetting(enableSound, cb)
-
Updates your 'notification sounds' preference.
Parameters:
Name Type Description enableSoundboolean The new value for this preference.
cbfunction - Source:
-
updateSearchableByNumber(searchable, cb)
-
Updates whether your account can be found with your phone number.
Parameters:
Name Type Description searchableboolean The new value for this preference.
cbfunction - Source:
-
updateSnapPrivacy(privacy, cb)
-
Updates who can send you snaps.
Parameters:
Name Type Description privacySnapPrivacy.Friends or SnapPrivacy.Everyone. Defaults to SnapPrivacy.Friends.
cbfunction - Source:
-
updateStoryPrivacy(privacy, friends, cb)
-
Updates who can see your stories. \e friends is only necessary when using StoryPrivacy.Custom.
Parameters:
Name Type Argument Description privacynumber StoryPrivacy.Everyone, StoryPrivacy.Friends, StoryPrivacy.Custom.
friendsArray.<string> <optional>
Optional list of strings of usernames to hide your stories from. Used only when privacy is StoryPrivacy.Custom.
cbfunction - Source:
-
updateTOSAgreementStatus(snapcash, snapcashV2, square, cb)
-
Updates your TOS agreement status for each of the three Terms of Service.
Parameters:
Name Type Description snapcashboolean snapcashV2boolean squareboolean cbfunction - Source:
-
uploadAvatar(images, cb)
-
Uploads a new animated avatar. Not working yet.
Parameters:
Name Type Description imagesArray.<Buffer> An array of 5 image Buffer objects.
cbfunction - Source: