Code Monkey home page Code Monkey logo

replapi's Introduction

Logo


Installation

Manager Command
pip $pip install REPLAPI
poetry python -m poetry add REPLAPI
Repl.it Search REPLAPI in the package tab and add it.

Contibuting

If you want to contribute to `REPLAPI`, please leave and issue or pull request! We will always(jk lol) do our best to get to it(or get to it at some point). We won't invite you to the repo, or the repl, but we ❤️ your contributions to the project! If you plan on making your own replapi, please don't fork out project and start there(or just plain plagerize). Please build it from the ground up! We will star it project and help you if you ever need it!

KTHXBAI!!!!!!!!

Special thanks to @RayhanADev for inspiring and helping with this project!

replapi's People

Contributors

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4 avatar darkdarcool avatar imgbotapp avatar kokonut27 avatar ttury avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

replapi's Issues

Data Query link

Now that I have your attention, I can now say for sure how to use the Replit GraphQL API. Feast your eyes.

https://dgraph.io/docs/graphql/api/requests/

From this documentation:

GET requests must be sent in the following format. The query, variables, and operation are sent as URL-encoded query parameters in the URL.

http://localhost:8080/graphql?query={...}&variables={...}&operation=...

Are you thinking of Expanding?

So I know your project has so far focused on getting just user information but are you ever thinking of expanding in the future? I would certainly be able to help if you need help with Post Data :)

a problem :/

This is my code:

import REPLAPI

REPLAPI.replit_cycles('IOP3')

It returns the error:

ERROR: Cannot find @IOP3's cycles!
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x0000027C72C7C940>
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.752.0_x64__qbz5n2kfra8p0\lib\asyncio\proactor_events.py", line 116, in __del__
    self.close()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.752.0_x64__qbz5n2kfra8p0\lib\asyncio\proactor_events.py", line 108, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.752.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 746, in call_soon
    self._check_closed()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.752.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 510, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

am i doing something wrong? @JBYT27 @darkdarcool

GraphQL Api requesting and examples

Hello peeps I have now fully learned the ways of the GraphQL Replit API and how to send requests.

Behold

image

This code will get a bunch of information about the person, including username, bio, cycles, and posts. We can discuss if you want to know more.

Why not try the actual Replit GraphQL API?

Heya! Just your friendly Furret dropping a tip!

Replit has an actual API at https://replit.com/graphql and the playground is at https://replit.com/graphql/playground. You can try making actual GraphQL queries instead of using middlemen sites and web scraping (it might be simpler too)!

For a (decent) compendium of Replit's GraphQL queries visit my repo REPLAPI.it and you'll find a decent amount of stringed queries in the src/classes/ folder (and the file names are pretty self-explanatory).

Feel free to respond with any questions or your thoughts :D

Better link for getting json data

You can in fact get data from https://replit.com/data/profiles/{Username here}.

This should be much faster and it include a lot more information including recent repls.

Here is an example of what you might recieve if you go to https://replit.com/data/profiles/EpicGamer007


{"classrooms":[],"emailHash":"364ee8cc3918a8ecd55ecac8810677ec","organization":null,"repls":[{"id":"ce302b60-5d6d-426c-a858-3f9cacf45f08","title":"whahhh","description":null,"language":"html","time_created":"2021-03-20T04:27:04.041Z","time_updated":"2021-03-20T04:27:04.046Z","url":"/@EpicGamer007/whahhh"},{"id":"0b473ab5-266c-4ebc-a532-7aaf271ea5a5","title":"Shoot! Jam project","description":null,"language":"bash","time_created":"2021-03-15T16:07:31.469Z","time_updated":"2021-03-20T14:59:21.556Z","url":"/@EpicGamer007/Shoot-Jam-project"},{"id":"59563ea3-6861-43d7-824a-01c4170b0a08","title":"graphqltest","description":null,"language":"nodejs","time_created":"2021-03-15T04:59:58.572Z","time_updated":"2021-03-15T05:01:03.370Z","url":"/@EpicGamer007/graphqltest"},{"id":"20096202-c03c-4a3a-9dca-a02b4a0375e9","title":"KaboomJS Jam Repl","description":null,"language":"html","time_created":"2021-03-12T17:06:11.280Z","time_updated":"2021-03-12T17:06:11.287Z","url":"/@EpicGamer007/KaboomJS-Jam-Repl"},{"id":"337fb9fb-0bca-4942-83eb-2654b1b9e8cd","title":"kaguya reader","description":"","language":"bash","time_created":"2021-03-11T19:23:08.137Z","time_updated":"2021-03-11T21:57:20.839Z","url":"/@EpicGamer007/kaguya-reader"},{"id":"3378936d-258f-4672-b573-31e744b44cdd","title":"Plans for the future","description":null,"language":"bash","time_created":"2021-03-06T00:56:46.970Z","time_updated":"2021-03-06T00:56:46.973Z","url":"/@EpicGamer007/Plans-for-the-future"},{"id":"8e7bc805-a327-4e32-8563-4efa10166b68","title":"game thing cuz y not","description":null,"language":"cpp","time_created":"2021-03-04T19:17:20.374Z","time_updated":"2021-03-06T00:56:32.738Z","url":"/@EpicGamer007/game-thing-cuz-y-not"},{"id":"f2a02219-39d3-4d6e-9e90-cfcb728f46fb","title":"RandomC++Thing Why am i doing this","description":null,"language":"cpp","time_created":"2021-03-04T01:34:21.973Z","time_updated":"2021-03-06T00:56:34.807Z","url":"/@EpicGamer007/RandomCThing-Why-am-i-doing-this"},{"id":"fd9f4076-9acc-4c37-93cd-afcca50e6bfe","title":"Pointers explained by winters","description":null,"language":"cpp","time_created":"2021-02-26T19:44:05.413Z","time_updated":"2021-03-06T00:56:36.333Z","url":"/@EpicGamer007/Pointers-explained-by-winters"},{"id":"aee04288-f98d-4ae9-9802-d77ae5474b54","title":"donut thing","description":null,"language":"c","time_created":"2021-02-23T01:20:35.051Z","time_updated":"2021-02-23T01:20:34.914Z","url":"/@EpicGamer007/donut-thing"}],"id":3206468,"username":"EpicGamer007","firstName":"Abhay","bio":"nodejs pog. ","lastName":null,"icon":{"url":"https://storage.googleapis.com/replit/images/1601936247412_7b95adf47e5e057ad617c943feddac55.png","id":374666},"isTeam":false,"topLanguages":["bash","cpp","html"]}

I am pretty sure you need to use https requests for this. Check out this repl which makes use of this. if you add caching as an option as well, it might be faster.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.