Jump to content

Configuration page and plugin config


Recommended Posts

thefirstofthe300
Posted

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?

Posted

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.

thefirstofthe300
Posted

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. 

Posted

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

thefirstofthe300
Posted (edited)

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
Posted

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.

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...