thefirstofthe300 292 Posted March 18, 2015 Posted March 18, 2015 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?
ebr 16169 Posted March 18, 2015 Posted March 18, 2015 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 292 Posted March 18, 2015 Author Posted March 18, 2015 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.
ebr 16169 Posted March 18, 2015 Posted March 18, 2015 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 292 Posted March 18, 2015 Author Posted March 18, 2015 (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 March 18, 2015 by DaBungalow
ebr 16169 Posted March 18, 2015 Posted March 18, 2015 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now