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

Add new API for Go component #152

Merged
merged 4 commits into from
Feb 10, 2022

Conversation

MichaelTsengLZ
Copy link
Contributor

No description provided.

docs/using-data.md Show resolved Hide resolved
revision: v0.0.0-20200419152657-af9db7f4a3ab
```

With this API, we need to encode the slashes in the namespace as '%2F'. You could do that by calling `encodeURIComponent(namespace)` in JS or similiar function in other language. So, for this example, the namespace we use in the coordinates is github.com%2Fquasilyte%2Fregex. Our coordinates would now look like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest rewording this as:

We need to encode the slashes in the namespace as '%2F'. You could do that by calling `encodeURIComponent(namespace)` in JavaScript or a similar function in other languages. You could also manually add the encoding to the namespace. For this example, the namespace `github.com/quasilyte/regex` would become `github.com%2Fquasilyte%2Fregex`. 

After encoding the namespace, our coordinates would now look like this:

revision: v0.0.0-20200419152657-af9db7f4a3ab
```

Put together, our corrdinates looks like: `go/golang/github.com%2Fquasilyte%2fregex/syntax/v0.0.0-20200419152657-af9db7f4a3ab`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be reworded as:

"Put together, our coordinates now look like this: go/golang/github.com%2Fquasilyte%2fregex/syntax/v0.0.0-20200419152657-af9db7f4a3ab"


Put together, our corrdinates looks like: `go/golang/github.com%2Fquasilyte%2fregex/syntax/v0.0.0-20200419152657-af9db7f4a3ab`

Because now the corrdinates is added in the query parameters, we need to encode the whole coordinates, e.g. calling encodeURIComponent() in JS.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't clear enough to a new user (especially one who may not have an engineering background).

I suggest rewording it to:

Because we pass the coordinates as a query parameter, we need to encode the whole coordinate string. You could do that by calling encodeURIComponent(namespace) in JavaScript or a similar function in other languages. You could also manually add the encoding to the coordinates. After the encoding, go/golang/github.com%2Fquasilyte%2fregex/syntax/v0.0.0-20200419152657-af9db7f4a3ab would become go%2Fgolang%2Fgithub.com%252Fquasilyte%252Fregex%2Fsyntax%2Fv0.0.0-20200407221936-30656e2c4a95.


To use the API, `Accept-Version: 1.0.0` must be added to the headers.

Here is an example.
You could try with the follwing curl command..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be reworded to:

Here is a curl command you could use with the example coordinates.

@nellshamrell
Copy link
Contributor

A few more changes requested and then this will be good to deploy along with the Service pull request

Copy link
Contributor

@nellshamrell nellshamrell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! This can be merged when this Service PR is deployed.

@nellshamrell nellshamrell merged commit 73e0ed1 into clearlydefined:master Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants