Sobes.tech

Homework #2: Design a REST API for a social network VKontakte with the following operations: • add and remove friends; • view user's friends; • view user's profile; • publish a post in the feed; • upload media files for posts; • view the feed (home and user feeds); • view dialogues and chats; • send and read messages in dialogues and chats. addFriend(post) POST /users/{id}/friends deleteFriend(delete) DELETE /users/{id}/friends/{friends_id} getUserFriends(get) GET /users/{id}/friends getUserForm(get) GET /users/{id}/profile createPost(post) POST /posts uploadMediaFile(post) POST /media getFeed(home/user) GET /feed GET /users/{id}/feed getDialogues(get) GET /dialogs sendMessage(post) POST /dialogs/{id}/messages getMessage(get) GET /dialogs/{id}/messages

177

// Question 2. What will be displayed on the screen package main import "fmt" func main() { { defer fmt.Println(1) } defer fmt.Println(2) panic("aaaa") defer func(){ if r := recover(); r != nil{ fmt.Println("Panic handled", r) } }() }

176

Does the corporate platform for processing logistical and operational data involve creating and calculating logistics routes?

176

Implementation of the patch process for loading and recalculating historical data — what does recalculating historical data mean? Why recalculate every night?

174
/11