Skip to content

Commit

Permalink
Add docs on select and sample
Browse files Browse the repository at this point in the history
  • Loading branch information
J535D165 authored Mar 27, 2023
1 parent 61ca949 commit d1e927d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ The following features of OpenAlex are currently supported by PyAlex:
- [x] Search entities
- [x] Group entities
- [x] Search filters
- [x] Select fields
- [x] Sample
- [x] Pagination
- [ ] [Autocomplete endpoint](https://docs.openalex.org/how-to-use-the-api/get-lists-of-entities/autocomplete-entities)
- [x] N-grams
Expand Down Expand Up @@ -193,6 +195,22 @@ OpenAlex reference: [Sort entity lists](https://docs.openalex.org/api-entities/w
Works().sort(cited_by_count="desc").get()
```

#### Select

OpenAlex reference: [Select fields](https://docs.openalex.org/how-to-use-the-api/get-lists-of-entities/select-fields).

```python
Works().filter(publication_year=2020, is_oa=True).select(["id", "doi"]).get()
```

#### Sample

OpenAlex reference: [Sample entity lists](https://docs.openalex.org/how-to-use-the-api/get-lists-of-entities/sample-entity-lists).

```python
Works().sample(100, seed=535).get()
```

#### Logical expressions

OpenAlex reference: [Logical expressions](https://docs.openalex.org/how-to-use-the-api/get-lists-of-entities/filter-entity-lists#logical-expressions)
Expand Down

0 comments on commit d1e927d

Please sign in to comment.