GhostSharp
GhostSharp copied to clipboard
Support for subdirectories
My Ghost instance is located at https://mydomain.com/blog/cms. When I try to initialize using this URI, the wrapper won't function.
I'm guessing this is because the RestClient uses https://mydomain.com/ghost/api/v2/content/ as it's Url.
The partial uri /ghost/api/v2/content/ is what gets added after wherever you're hosting Ghost, so have you tried using something like this?
var ghost = new GhostSharp.GhostContentAPI("https://mydomain.com/blog/cms/ghost/api/v2/content/", "a6d33f1b95ff17adf0f787a70a");
Or do you mean that instead of having to do a GET on "https://mydomain.com/ghost/api/v2/content/posts/some-random-post-id" (for example) you would actually do something like "https://mydomain.com/blog/cms/posts/some-random-post-id"?
Sorry for the late response! But yes, we indeed have something in the lines of "https://mydomain.com/blog/cms/posts/some-random-post-id"
No worries.. life gets crazy sometimes!
Do you know which part of your URL the /ghost/api/v3/content/ would get attached to then? Does it end up getting appended like this?
https://mydomain.com/blog/cms/ghost/api/v3/content/
In that case, you could probably just call the API like this:
var ghost = new GhostSharp.GhostContentAPI("https://mydomain.com/blog/cms/", "your_api_key");
If that's not the case, like if your API is available at https://mydomain.com/blog/cms/api/v3/content or simply https://mydomain.com/blog/cms , I'll need to make the library more flexible to account for that.