Jump to content

Configuration page and plugin config


thefirstofthe300

Recommended Posts

thefirstofthe300

I have been browsing through the configuration pages for Folder Sync and Google Drive.

 

I have a question about how the plugin configuration is stored as it isn't obvious to me.

 

How does this code work?

ApiClient.ajax({
    type: "POST",
    url: ApiClient.getUrl("FolderSync/Folders"),
    data: JSON.stringify(folder),
    contentType: "application/json"
})

Specifically, how does the FolderSync/Folders get created?

Link to comment
Share on other sites

That code is calling an API endpoint on the server.  Specifically, it is adding a folder to the list of sync folders it looks like.

Link to comment
Share on other sites

thefirstofthe300

Right. But in a stock install, that endpoint doesn't appear to exist. How does it get created?

 

Sorry if this is a bit noobish. 

Link to comment
Share on other sites

What makes you think it doesn't exist?  You sure you are comparing like server versions?  Folder Sync is new in this dev cycle.

Link to comment
Share on other sites

thefirstofthe300

Ok. I think this makes sense now. The plugins are creating there own endpoints as seen in the trakt plugin at Trakt/Api/ServerApiEndpoint. Duh.

 

I am running two dev servers so the reason it appeared in one but not the other is that I didn't have it installed.

Edited by DaBungalow
Link to comment
Share on other sites

Oh, yes.  It is possible for plug-ins to create their own api end points.  Most of mine do so I missed the nuance of your question.  Sorry.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...