https://github.com/leeper/lumendb
Lumen Database (Chilling Effects) API Client
https://github.com/leeper/lumendb
chilling-effects copyright copyright-takedown cran lumen-database r
Last synced: about 1 year ago
JSON representation
Lumen Database (Chilling Effects) API Client
- Host: GitHub
- URL: https://github.com/leeper/lumendb
- Owner: leeper
- Created: 2015-11-05T10:06:39.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-10-10T12:32:20.000Z (over 8 years ago)
- Last Synced: 2025-03-24T06:12:01.875Z (over 1 year ago)
- Topics: chilling-effects, copyright, copyright-takedown, cran, lumen-database, r
- Language: R
- Homepage: https://cloud.r-project.org/package=lumendb
- Size: 19.5 KB
- Stars: 14
- Watchers: 5
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
Awesome Lists containing this project
README
# Lumen Database API Client
**lumendb** is a simple client package for the [Lumen Database](http://lumendatabase.org/) (formerly Chilling Effects) [API](https://github.com/berkmancenter/lumendatabase/blob/master/doc/api_documentation.mkd). It can retrieve, as well as deposit, copyright takedown notices from the Lumen database. It may be useful for tracking who is sending copyright-related cease and desist orders and what material is being used in apparent violation of copyright.
All Lumen Database data [is released under to Public Domain (CC0)](https://www.lumendatabase.org/pages/license), though the API has additional [terms of use](https://lumendatabase.org/pages/api_terms).
Use of the package does not require an API token, though Lumen rate limits non-authenticated requests. To request a token, contact Lumen directly at: team (at) lumendatabase.org. The token should then be stored as an environment variable:
```R
Sys.setenv(LUMEN_TOKEN = "t1o2k3e4n5v6a7l8u9e")
```
Or this can be passed atomically to every API call. Setting the environment variable is simpler and more secure because it will not be recorded in R history logs.
## Code Examples
The key functionality of the package is to retrieve notices by their identification numbers and to search for notices. To retrieve a single notice, just query it:
```{r}
library("lumendb")
x <- ldnotice(1)
summary(x)
```
The `summary()` method will print some essential details for each notice, as seen above.
The other major function is to search for notices by keyword. The search functionality is pretty complicated, so I have not written R-specific documentation for it. The search API is based on elastic search and [Lumen's documentation is available on GitHub](https://github.com/berkmancenter/lumendatabase/blob/dev/doc/api_documentation.mkd#search-notices-via-fulltext) for those who are interested. As a simple example, one can perform a full-text search for notices related to YouTube:
```{r}
x <- ldsearch(list(term = "youtube"))
print(x)
```
Another example would be to retrieve 100 requests from a major takedown requester, The Publishers Association, which represents a large number of publishing companies:
```{r}
# query 50 notices
x <- ldsearch(list(sender_name = "The Publishers Association"), per_page = 50)
# view first two notices
summary(x[[1]])
summary(x[[2]])
```
The `ldsearch()` function is, like the API it wraps, paginated and pagination details are printed by to the console by default and are available in `meta` attribute in the search result list.
Note: the notice submission API is not yet implemented in this package.
## Installation
[](https://cran.r-project.org/package=lumendb)

[](https://travis-ci.org/leeper/lumendb)
[](https://codecov.io/github/leeper/lumendb?branch=master)
This package is not yet on CRAN. To install the latest development version from GitHub, run the following:
```R
if (!require("ghit")) {
install.packages("ghit")
}
ghit::install_github("leeper/lumendb")
```