Skip to content

kotamanegi/AtCoderProblems

 
 

Repository files navigation

AtCoder Problems

Build Status codecov

Backend API Server

API server application and scrapers are written in Scala.

Build

sbt assembly

Test

To run all the tests, you need to prepare PostgreSQL with a test database.

sbt test

Run

After running the build command, you will have target/scala-*/atcoder-problems-assembly-*.jar. It is a .jar package, which is executable of Java. You can run the API server by the following command with a configuration files env.json. Please make sure you already have the PostgreSQL environment with required databases before running. A sample of the config file and the schema file of the database are in atcoder-problems-backend/src/test/resources.

java -jar target/scala-*/atcoder-problems-*.jar env.json

Frontend Web Application

Frontend web application is written in TypeScript.

Build

# install node modules
npm install

# generate js file and source map
webpack

# generate minified js file
npm run build

Test

npm test

Docker

#build Dockerfile
docker build ./

#run docker image
docker run -h spam -i -t {image_name} /bin/bash

#after you entered shell
#please start db server
service postgresql start

You can login db server with this user:name="kenkoooo",password="pass",dbname="test". This docker image has everything you need for building and testing this repository(including prepared db server). You can use git to get data and start testing.

API

Please use API politely. Especially, please ensure using cache and adding delay if you develop a bot.

APIは行儀良く利用してください。 特にbotを開発している場合は、ETagを用いたキャッシュを利用し、連続して呼び出す際はある程度 (例えば1秒) の遅延をはさむようにしてください。 1日に数万回以上のリクエストをしたい場合は事前に相談してください。

ブラウザ上からJavaScriptで直接利用している場合はあまり気にする必要はありません。 キャッシュはブラウザがよしなにやってくれますし、呼び出し回数もたいてい多くならないためです。 botの場合も1日に1000回以下程度のリクエストであればたいした負荷にはならないので心配する必要はありません。

Information API

(The API info/* are deprecated. Please use new API.)

Statistics API

(The API info/* are deprecated. Please use new API.)

UserInfo API

Submission API

(The API results?user=wata&rivals=iwiwi,chokudai is obsoleted since it's difficult to cache. Please call above API 3 times as results?user=wata, results?user=iwiwi and results?user=chokudai.)

Dataset

You can download whole data, which are crawled by the official crawler.

About

Problem manager for AtCoder users

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Scala 51.0%
  • TypeScript 40.4%
  • Python 4.9%
  • JavaScript 1.4%
  • CSS 1.3%
  • HTML 0.7%
  • Dockerfile 0.3%