Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for subdirectories #19

Open
MarcBroers opened this issue Sep 8, 2020 · 3 comments
Open

Support for subdirectories #19

MarcBroers opened this issue Sep 8, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@MarcBroers
Copy link

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.

@grantwinney
Copy link
Owner

grantwinney commented Sep 21, 2020

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"?

@grantwinney grantwinney added the enhancement New feature or request label Sep 21, 2020
@MarcBroers
Copy link
Author

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"

@grantwinney
Copy link
Owner

grantwinney commented Dec 24, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants