Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Matrix-Sasuke
pleroma-fe
Commits
f9b3f8df
Commit
f9b3f8df
authored
8 years ago
by
lain
Browse files
Options
Downloads
Patches
Plain Diff
Add all_following endpoint.
parent
038798f3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/services/api/api.service.js
+9
-1
9 additions, 1 deletion
src/services/api/api.service.js
src/services/backend_interactor_service/backend_interactor_service.js
+5
-0
5 additions, 0 deletions
.../backend_interactor_service/backend_interactor_service.js
with
14 additions
and
1 deletion
src/services/api/api.service.js
+
9
−
1
View file @
f9b3f8df
/* eslint-env browser */
const
LOGIN_URL
=
'
/api/account/verify_credentials.json
'
const
FRIENDS_TIMELINE_URL
=
'
/api/statuses/friends_timeline.json
'
const
ALL_FOLLOWING_URL
=
'
/api/qvitter/allfollowing
'
const
PUBLIC_TIMELINE_URL
=
'
/api/statuses/public_timeline.json
'
const
PUBLIC_AND_EXTERNAL_TIMELINE_URL
=
'
/api/statuses/public_and_external_timeline.json
'
const
FAVORITE_URL
=
'
/api/favorites/create
'
...
...
@@ -54,6 +55,12 @@ const fetchFriends = ({credentials}) => {
.
then
((
data
)
=>
data
.
json
())
}
const
fetchAllFollowing
=
({
username
,
credentials
})
=>
{
const
url
=
`
${
ALL_FOLLOWING_URL
}
/
${
username
}
.json`
return
fetch
(
url
,
{
headers
:
authHeaders
(
credentials
)
})
.
then
((
data
)
=>
data
.
json
().
users
)
}
const
fetchMentions
=
({
username
,
sinceId
=
0
,
credentials
})
=>
{
let
url
=
`
${
MENTIONS_URL
}
?since_id=
${
sinceId
}
&screen_name=
${
username
}
`
return
fetch
(
url
,
{
headers
:
authHeaders
(
credentials
)
})
...
...
@@ -169,7 +176,8 @@ const apiService = {
retweet
,
postStatus
,
deleteStatus
,
uploadMedia
uploadMedia
,
fetchAllFollowing
}
export
default
apiService
This diff is collapsed.
Click to expand it.
src/services/backend_interactor_service/backend_interactor_service.js
+
5
−
0
View file @
f9b3f8df
...
...
@@ -17,6 +17,10 @@ const backendInteractorService = (credentials) => {
return
apiService
.
fetchFriends
({
credentials
})
}
const
fetchAllFollowing
=
({
username
})
=>
{
return
apiService
.
fetchAllFollowing
({
username
,
credentials
})
}
const
followUser
=
(
id
)
=>
{
return
apiService
.
followUser
({
credentials
,
id
})
}
...
...
@@ -32,6 +36,7 @@ const backendInteractorService = (credentials) => {
fetchFriends
,
followUser
,
unfollowUser
,
fetchAllFollowing
,
verifyCredentials
:
apiService
.
verifyCredentials
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment