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

docs: update README #220

Merged
merged 3 commits into from
Jun 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

A Go HTTP client for the [MongoDB Atlas API](https://docs.atlas.mongodb.com/api/).

Note that atlas only supports the two most recent major versions of Go.
Note that `go-client-mongodb-atlas` only supports the two most recent major versions of Go.

## Usage

Expand All @@ -30,12 +30,12 @@ can be used as a starting point.

### Authentication

The mongodbatlas library does not directly handle authentication. Instead, when
creating a new client, pass an http.Client that can handle Digest Access authentication for
The `go-client-mongodb-atlas` library does not directly handle authentication. Instead, when
creating a new client, pass an `http.Client` that can handle Digest Access authentication for
you. The easiest way to do this is using the [digest](https://github.com/mongodb-forks/digest)
library, but you can always use any other library that provides an `http.Client`.
If you have a private and public API token pair (https://docs.atlas.mongodb.com/configure-api-access),
you can use it with the digest library using:
you can use it with the digest library like:

```go
import (
Expand All @@ -54,7 +54,7 @@ func main() {
}

client := mongodbatlas.NewClient(tc)
orgs, _, err := client.Projects.GetAllProjects(context.Background(), nil)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👀

projects, _, err := client.Projects.GetAllProjects(context.Background(), nil)
}
```

Expand Down