Friends
Friends and social features
curl -X GET "https://example.com/friends/"fetch("https://example.com/friends/")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/friends/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/friends/"
response = requests.request("GET", url)
print(response.text)Empty
curl -X GET "https://example.com/friends/invitations?direction=incoming"fetch("https://example.com/friends/invitations?direction=incoming")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/friends/invitations?direction=incoming"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/friends/invitations?direction=incoming"
response = requests.request("GET", url)
print(response.text)Empty
Post Friends Invite
Send a friend invitation to a user (local or remote)
Request Body
application/jsonRequiredhandleRequiredstringsignatureRequiredstringResponse Body
curl -X POST "https://example.com/friends/invite" \
-H "Content-Type: application/json" \
-d '{
"handle": "string",
"signature": "string"
}'const body = JSON.stringify({
"handle": "string",
"signature": "string"
})
fetch("https://example.com/friends/invite", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/friends/invite"
body := strings.NewReader(`{
"handle": "string",
"signature": "string"
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/friends/invite"
body = {
"handle": "string",
"signature": "string"
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)Empty
Post Friends Invitations By Id Accept
Accept a pending friend invitation
Request Body
application/jsonRequiredsignatureRequiredstringPath Parameters
idRequiredstringResponse Body
curl -X POST "https://example.com/friends/invitations/string/accept" \
-H "Content-Type: application/json" \
-d '{
"signature": "string"
}'const body = JSON.stringify({
"signature": "string"
})
fetch("https://example.com/friends/invitations/string/accept", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/friends/invitations/string/accept"
body := strings.NewReader(`{
"signature": "string"
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/friends/invitations/string/accept"
body = {
"signature": "string"
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)Empty
Post Friends Invitations By Id Reject
Reject a pending friend invitation
Request Body
application/jsonRequiredsignaturestringPath Parameters
idRequiredstringResponse Body
curl -X POST "https://example.com/friends/invitations/string/reject" \
-H "Content-Type: application/json" \
-d '{
"signature": "string"
}'const body = JSON.stringify({
"signature": "string"
})
fetch("https://example.com/friends/invitations/string/reject", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/friends/invitations/string/reject"
body := strings.NewReader(`{
"signature": "string"
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/friends/invitations/string/reject"
body = {
"signature": "string"
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)Empty
Delete Friends Invitations By Id
Cancel an outgoing friend invitation
Path Parameters
idRequiredstringResponse Body
curl -X DELETE "https://example.com/friends/invitations/string"fetch("https://example.com/friends/invitations/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/friends/invitations/string"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/friends/invitations/string"
response = requests.request("DELETE", url)
print(response.text)Empty
curl -X DELETE "https://example.com/friends/string"fetch("https://example.com/friends/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/friends/string"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/friends/string"
response = requests.request("DELETE", url)
print(response.text)Empty
Get Friends Resolve By Handle
Resolve a handle to user info (local or remote)
Path Parameters
handleRequiredstringResponse Body
curl -X GET "https://example.com/friends/resolve/string"fetch("https://example.com/friends/resolve/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/friends/resolve/string"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/friends/resolve/string"
response = requests.request("GET", url)
print(response.text)Empty
curl -X POST "https://example.com/friends/sync-keys"fetch("https://example.com/friends/sync-keys")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/friends/sync-keys"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/friends/sync-keys"
response = requests.request("POST", url)
print(response.text)Empty