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

Test pr #1

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
87362f1
delete logging
joshuabezaleel May 12, 2022
50248bc
TODO: FileLinks
joshuabezaleel May 12, 2022
b7a4599
In Progress: Add Files group endpoint
joshuabezaleel May 12, 2022
1a423f8
Move Timestamp to osf.go
joshuabezaleel May 12, 2022
c2ee13e
Add example for file, fix jsonapi structtag ID
joshuabezaleel May 12, 2022
60cfbb4
strip jsonapi lib + implement own response model with generics
azaky May 13, 2022
d2f248b
use mapstructure for unmarshaling FileLinks
azaky May 13, 2022
b3dff1c
complete Links and Relationships objects + build function
azaky May 13, 2022
0649900
add missing buildFile
azaky May 13, 2022
9529109
IN PROGRESS: Download file
joshuabezaleel May 13, 2022
612a74f
IN PROGRESS: Download file
joshuabezaleel May 13, 2022
b422b92
Resolve conflict
joshuabezaleel May 13, 2022
0141e18
Download File
joshuabezaleel May 13, 2022
8eabc39
implement list preprints providers
azaky May 15, 2022
82e8680
Enable filter query params for list endpoint
joshuabezaleel May 15, 2022
606e198
Add test for Preprints_List
joshuabezaleel May 15, 2022
f50fd9f
Remove Citations for now
joshuabezaleel May 15, 2022
a67f9e5
Add test for Files.GetFileByID
joshuabezaleel May 15, 2022
7283827
implement create preprints
azaky May 15, 2022
c983829
add update preprints
azaky May 15, 2022
675cfe8
add get preprints primary files
azaky May 15, 2022
337f55a
add readme
azaky May 15, 2022
968bd38
add license
azaky May 16, 2022
d0b3b0a
inject pagination meta into ManyPayload
azaky May 16, 2022
09baeb5
remove debug
azaky May 16, 2022
6ff6e13
cleanup
azaky May 16, 2022
9fa961a
update examples
azaky May 16, 2022
70060a5
add docs
azaky May 16, 2022
0951271
bump to v0.0.3
azaky May 16, 2022
b07b705
add github actions
azaky May 16, 2022
6df235e
add tests badge
azaky May 16, 2022
0cea967
test change pr branch
joshuabezaleel Jun 7, 2022
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
Prev Previous commit
Next Next commit
cleanup
  • Loading branch information
azaky committed May 16, 2022
commit 6ff6e130a9da5a460e6a33c19594a19d7fd5f6c6
9 changes: 0 additions & 9 deletions .gitpod.yml

This file was deleted.

7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ package main
import (
"context"
"log"
"os"

"github.com/joshuabezaleel/go-osf/osf"
"golang.org/x/oauth2"
Expand All @@ -37,7 +36,7 @@ import (
func main() {
ctx := context.Background()
ts := oauth2.StaticTokenSource(
&oauth2.Token{AccessToken: os.Getenv("OSF_API_TOKEN")},
&oauth2.Token{AccessToken: "your token here ..."},
)
tc := oauth2.NewClient(ctx, ts)

Expand All @@ -64,3 +63,7 @@ func main() {
```

Head over to the [examples folder](examples) or [pkg.go.dev](https://pkg.go.dev/github.com/joshuabezaleel/go-osf) for more usage examples.

## License

This library is distributed under the MIT license found in the [LICENSE.txt](LICENSE.txt) file.
Empty file added examples/README.md
Empty file.
20 changes: 20 additions & 0 deletions examples/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module github.com/joshuabezaleel/go-osf/examples

go 1.18

require (
github.com/davecgh/go-spew v1.1.1
github.com/joshuabezaleel/go-osf v0.0.2
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5
)

require (
github.com/golang/protobuf v1.4.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/protobuf v1.25.0 // indirect
)

replace github.com/joshuabezaleel/go-osf => ../
376 changes: 376 additions & 0 deletions examples/go.sum

Large diffs are not rendered by default.

3,243 changes: 0 additions & 3,243 deletions examples/preprint_providers/preprint_providers.json

This file was deleted.

181 changes: 0 additions & 181 deletions examples/preprints/preprint.json

This file was deleted.

9 changes: 3 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@ module github.com/joshuabezaleel/go-osf
go 1.18

require (
github.com/davecgh/go-spew v1.1.1
github.com/google/go-cmp v0.5.8
github.com/google/go-querystring v1.1.0
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.7.1
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5
)

require (
github.com/golang/protobuf v1.4.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
)
Loading