HTTP Method
Endpoint
/reddit_users/
Example
const axios = require ( 'axios' ) ;
axios . get ( 'http://127.0.0.1:8080/reddit_users/' , {
headers : {
Authorization : 'Basic cAebyYIUtX-3urYrp05_GlxtrVgLUKX7rQxDBdG5mGA' ,
} ,
} )
. then ( response => console . log ( response . data ) )
. catch ( error => console . error ( error ) ) ;
HTTP Method
Endpoint
/reddit_users/{USER}/
Example
const axios = require ( 'axios' ) ;
axios . get ( 'http://127.0.0.1:8080/reddit_users/spez/' , {
headers : {
Authorization : 'Basic cAebyYIUtX-3urYrp05_GlxtrVgLUKX7rQxDBdG5mGA' ,
} ,
} )
. then ( response => console . log ( response . data ) )
. catch ( error => console . error ( error ) ) ;
HTTP Method
Endpoint
/reddit_users/
Example
const axios = require ( 'axios' ) ;
axios . post ( 'http://127.0.0.1:8080/reddit_users/' , {
username : 'new_user' ,
password : 'new_password' ,
client_id : 'new_client_id' ,
client_secret : 'new_client_secret' ,
} , {
headers : {
Authorization : 'Basic cAebyYIUtX-3urYrp05_GlxtrVgLUKX7rQxDBdG5mGA' ,
'Content-Type' : 'application/json' ,
} ,
} )
. then ( response => console . log ( response . data ) )
. catch ( error => console . error ( error ) ) ;
4. Update user information
HTTP Method
Endpoint
/reddit_users/{USER}/
Example
const axios = require ( 'axios' ) ;
axios . put ( 'http://127.0.0.1:8080/reddit_users/spez/' , {
username : 'spez' ,
password : 'new_password' ,
client_id : 'new_client_id' ,
client_secret : 'new_client_secret' ,
} , {
headers : {
Authorization : 'Basic cAebyYIUtX-3urYrp05_GlxtrVgLUKX7rQxDBdG5mGA' ,
'Content-Type' : 'application/json' ,
} ,
} )
. then ( response => console . log ( response . data ) )
. catch ( error => console . error ( error ) ) ;
HTTP Method
Endpoint
/reddit_users/{USER}/
Example
const axios = require ( 'axios' ) ;
axios . delete ( 'http://127.0.0.1:8080/reddit_users/spez/' , {
headers : {
Authorization : 'Basic cAebyYIUtX-3urYrp05_GlxtrVgLUKX7rQxDBdG5mGA' ,
} ,
} )
. then ( response => console . log ( response . data ) )
. catch ( error => console . error ( error ) ) ;
6. Get all scheduled submissions
HTTP Method
Endpoint
/scheduled_submissions/
Example
const axios = require ( 'axios' ) ;
axios . get ( 'http://127.0.0.1:8080/scheduled_submissions/' , {
headers : {
Authorization : 'Basic cAebyYIUtX-3urYrp05_GlxtrVgLUKX7rQxDBdG5mGA' ,
} ,
} )
. then ( response => console . log ( response . data ) )
. catch ( error => console . error ( error ) ) ;
7. Schedule a new submission
HTTP Method
Endpoint
/scheduled_submissions/
Example
const axios = require ( 'axios' ) ;
axios . post ( 'http://127.0.0.1:8080/scheduled_submissions/' , {
username : 'spez' ,
planned_unix_datetime : 1753876468 ,
sub : 'ProgrammerHumor' ,
title : 'New submission' ,
text : 'Lorem ipsum dolor sit down' ,
flairid : null ,
nsfw : false ,
crosspost_requests : [ {
sub : 'EtsyMemes' ,
planned_unix_datetime : 1753877470 ,
} ] ,
} , {
headers : {
Authorization : 'Basic cAebyYIUtX-3urYrp05_GlxtrVgLUKX7rQxDBdG5mGA' ,
'Content-Type' : 'application/json' ,
} ,
} )
. then ( response => console . log ( response . data ) )
. catch ( error => console . error ( error ) ) ;
8. Get details of a specific submission
HTTP Method
Endpoint
/scheduled_submissions/{SUBMISSION_ROWID}/
Example
const axios = require ( 'axios' ) ;
axios . get ( 'http://127.0.0.1:8080/scheduled_submissions/1/' , {
headers : {
Authorization : 'Basic cAebyYIUtX-3urYrp05_GlxtrVgLUKX7rQxDBdG5mGA' ,
} ,
} )
. then ( response => console . log ( response . data ) )
. catch ( error => console . error ( error ) ) ;
9. Update a scheduled submission
HTTP Method
Endpoint
/scheduled_submissions/{SUBMISSION_ROWID}/
Example
const axios = require ( 'axios' ) ;
axios . put ( 'http://127.0.0.1:8080/scheduled_submissions/1/' , {
username : 'spez' ,
planned_unix_datetime : 1753876468 ,
sub : 'ProgrammerHumor' ,
title : 'Updated submission' ,
text : 'Lorem ipsum dolor sit down' ,
flairid : null ,
nsfw : false ,
} , {
headers : {
Authorization : 'Basic cAebyYIUtX-3urYrp05_GlxtrVgLUKX7rQxDBdG5mGA' ,
'Content-Type' : 'application/json' ,
} ,
} )
. then ( response => console . log ( response . data ) )
. catch ( error => console . error ( error ) ) ;
10. Delete a scheduled submission
HTTP Method
Endpoint
/scheduled_submissions/{SUBMISSION_ROWID}/
Example
const axios = require ( 'axios' ) ;
axios . delete ( 'http://127.0.0.1:8080/scheduled_submissions/1/' , {
headers : {
Authorization : 'Basic cAebyYIUtX-3urYrp05_GlxtrVgLUKX7rQxDBdG5mGA' ,
} ,
} )
. then ( response => console . log ( response . data ) )
. catch ( error => console . error ( error ) ) ;
```
Make sure to replace the placeholders such as {USER}
and {SUBMISSION_ROWID}
with the actual values in your requests.