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

Snippet: SpeedRunFetcher.ex #6

Open
leeduckgo opened this issue May 22, 2022 · 2 comments
Open

Snippet: SpeedRunFetcher.ex #6

leeduckgo opened this issue May 22, 2022 · 2 comments

Comments

@leeduckgo
Copy link
Contributor

requirment:

fetch data from api of speedrun, and parser it for our need.

API Example:

get https://bewater.leeduckgo.com/builders

Response:

[
   ...
      {
  "id": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC",
  "creationTimestamp": 1633088553224,
  "role": "builder",
  "challenges": {
    "simple-nft-example": {
      "status": "ACCEPTED",
      "contractUrl": "https://etherscan.io/address/0xde30da39c46104798bb5aa3fe8b9e0e1f348163f",
      "deployedUrl": "https://github.com/austintgriffith/scaffold-eth/tree/simple-nft-example_v1",
      "reviewComment": "Nice work!"
    },
    "decentralized-staking": {
      "status": "REJECTED",
      "contractUrl": "https://etherscan.io/address/0xde30da39c46104798bb5aa3fe8b9e0e1f348163f",
      "deployedUrl": "https://github.com/austintgriffith/scaffold-eth/tree/challenge-1-decentralized-staking_v1",
      "reviewComment": "It throws an error when opening the app."
    }
  }
},
   ...
]

Input:

ethereum_addr, speedrun_api_endpoint, speedrun_url

Output:

%{chanllege_passed_num: num,  link: link_to_speedrun_profile, level: caculated_level_by_chanllege_passed_num}
@kenspirit
Copy link
Contributor

@leeduckgo speedrun_api_endpoint, speedrun_url 分别是啥? https://bewater.leeduckgo.com/buildersspeedrun_api_endpoint? link_to_speedrun_profile 是什么?level 怎么计算?返回最后一个 ACCEPTED 的 challenge 名字?

@leeduckgo
Copy link
Contributor Author

leeduckgo commented May 22, 2022

https://bewater.leeduckgo.com/builders = speedrun_api_endpoint

speedrun_url = https://speedrun-noncegeek.surge.sh/

link_to_speedrun_profile = https://speedrun-noncegeek.surge.sh/builders/0x73c7448760517E3E6e416b2c130E3c6dB2026A1d

level 的计算,现在先随便编一个?根据 accepted 的 challenge 的数量得出一个 level

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants