handlers

package
v0.0.0-...-d9c4052 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2014 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockHandler

func BlockHandler(c middleware.Context)

BlockHandler blocks an user

func ChangeLanguage

func ChangeLanguage(c middleware.Context)

ChangeLanguage changes the default language for the user

func ChangePostPrivacy

func ChangePostPrivacy(c middleware.Context, params martini.Params)

ChangePostPrivacy changes a post privacy settings

func CommentsForPost

func CommentsForPost(c middleware.Context, params martini.Params)

CommentsForPost returns a list with the comments for a post

func CreateAccount

func CreateAccount(c middleware.Context)

CreateAccount is a handler in charge of creating an user account. After a successful registration the user will be automatically logged in.

This handler needs the following parameters: - username: The username provided by the user - password: The password chosen by the user - password_repeat: The password, again - recovery_method (optional): The recovery method chosen by the user (look at the values for the type RecoveryMethod on the models package) - recovery_answer and recovery_question (optional): A recovery answer and question if the provided recovery method is question.

func CreateComment

func CreateComment(c middleware.Context)

CreateComment adds a comment to a post

func CreatePost

func CreatePost(c middleware.Context)

CreatePost creates a new post

func DeletePost

func DeletePost(c middleware.Context, params martini.Params)

DeletePost deletes a post owned by the user making the request

func DestroyAccount

func DestroyAccount(c middleware.Context)

DestroyAccount destroys the user account and all its related content such as comments, posts, images, etc.

func DestroyUserToken

func DestroyUserToken(c middleware.Context)

DestroyUserToken destroys the current user token

func GetAccessToken

func GetAccessToken(c middleware.Context)

GetAccessToken is a handler to retrieve an access token

func GetAccountInfo

func GetAccountInfo(c middleware.Context)

GetAccountInfo retrieves the info of the user

func GetAccountSettings

func GetAccountSettings(c middleware.Context)

GetAccountSettings retrieves the settings of the user

func GetUserPosts

func GetUserPosts(c middleware.Context)

GetUserPosts retrieves a list of posts from an user

func GetUserTimeline

func GetUserTimeline(c middleware.Context)

GetUserTimeline gets all posts, comments and likes needed to render the timeline for the user

func GetUserToken

func GetUserToken(c middleware.Context)

GetUserToken is a handler to retrieve an user token

func IsUsernameTaken

func IsUsernameTaken(c middleware.Context)

IsUsernameTaken checks if the given username is already taken

func LikePost

func LikePost(c middleware.Context, params martini.Params)

LikePost likes a post (or unlikes it if the post has already been liked)

func ListBlocks

func ListBlocks(c middleware.Context)

ListBlocks retrieves a list with the users the user has blocked

func ListFollowRequests

func ListFollowRequests(c middleware.Context)

ListFollowRequests returns all the user's follow requests

func ListFollowers

func ListFollowers(c middleware.Context)

ListFollowers retrieves a list with the user's followers

func ListFollowing

func ListFollowing(c middleware.Context)

ListFollowing retrieves a list with the users followed by the user

func ListNotifications

func ListNotifications(c middleware.Context)

ListNotifications list all the user's notifications

func Login

func Login(c middleware.Context)

Login is a handler to log the user in

func Logout

func Logout(c middleware.Context)

Logout terminates the user session and redirects to home

func MarkNotificationRead

func MarkNotificationRead(c middleware.Context)

MarkNotificationRead marks a notification as read

func RemoveComment

func RemoveComment(c middleware.Context, params martini.Params)

DeleteComment removes a comment from a post

func ReplyFollowRequest

func ReplyFollowRequest(c middleware.Context)

ReplyFollowRequests replies a follow request

func Search(c middleware.Context)

Search is a handler for searching users

func SendFollowRequest

func SendFollowRequest(c middleware.Context)

SendFollowRequests sends a follow request from an user to another user

func ShowPost

func ShowPost(c middleware.Context, params martini.Params)

ShowPost returns all data about a post including comments and likes

func ShowUserProfile

func ShowUserProfile(c middleware.Context, params martini.Params)

ShowUserProfile retrieves a list of the first 25 posts and the data of the requested user

func Unblock

func Unblock(c middleware.Context)

Unblock unblocks an user

func Unfollow

func Unfollow(c middleware.Context)

Unfollow unfollows an user

func UpdateAccountData

func UpdateAccountData(c middleware.Context)

UpdateAccountData updates some data about the user like the names and the preferred language

func UpdateAccountInfo

func UpdateAccountInfo(c middleware.Context)

UpdateAccountInfo updates the user's information

func UpdateAccountPassword

func UpdateAccountPassword(c middleware.Context)

UpdateAccountPassword updates the user password

func UpdateAccountSettings

func UpdateAccountSettings(c middleware.Context)

UpdateAccountSettings updates the user's settings

func UpdateProfilePicture

func UpdateProfilePicture(c middleware.Context)

UpldateProfilePicture updates the current profile picture of the user

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL