GithubHelp home page GithubHelp logo

Comments (15)

devvsakib avatar devvsakib commented on May 7, 2024 1

yeah I'm currently working on it

from github-error-solve.

MohamedAlDeep avatar MohamedAlDeep commented on May 7, 2024 1

@devvsakib I am interested in this and i am learning about it so i am also doing it, i wanted to ask you about this
image
i reached to this but i dont know how to fetch the data from the new URLs
I dont know if you did this and i dont know how you are going to do it , if you did it then i will check how you did it after you finish, if you didnt then lets help each other because api things are kinda new to me

from github-error-solve.

devvsakib avatar devvsakib commented on May 7, 2024 1

yeah GitHub API has limitation for request

from github-error-solve.

MohamedAlDeep avatar MohamedAlDeep commented on May 7, 2024

the line breaks your code from mine(visually)

import { useState, useEffect } from 'react'

function App() {
// ================================================================== 
  const url = 'https://api.github.com/repos/devvsakib/github-error-solve/contributors'
  const [data, setData] = useState([])
  useEffect( () => {
    const fetchUsers = async (url) => {
      const response = await fetch(url)
      const users = await response.json()
      setData(users)
    }
    fetchUsers(url)
  }, [data.length])
// =================================================================== 
const [userData, setuserData] = useState([])
var userUrl
data.map( data => {
      userUrl = `https://api.github.com/users/${data.login}`
    console.log(userUrl)

   

  }
  
  )
  useEffect( () => { 
    const fetchTwitter = async (userUrl) => {
      const Userresponse = await fetch(userUrl)
      const twitter = await Userresponse.json()
      setuserData(twitter)
    }
    fetchTwitter(userUrl)
    }, [userData.length])
  
// ===================================================================
  return (
    
    <div> 
    
      {
        userData.map(userData => 
          <h1>{userData.twitter_username}</h1>
          )
      }
    </div>
  )
}

export default App

from github-error-solve.

MohamedAlDeep avatar MohamedAlDeep commented on May 7, 2024

actually i got another idea

from github-error-solve.

MohamedAlDeep avatar MohamedAlDeep commented on May 7, 2024

nvm all that code

from github-error-solve.

MohamedAlDeep avatar MohamedAlDeep commented on May 7, 2024

God i just got the same product with less code LMAO

Image

image

Code

import { useState, useEffect } from 'react'

function App() {
// ================================================================== 
  const url = 'https://api.github.com/repos/devvsakib/github-error-solve/contributors'
  const [data, setData] = useState([])
  useEffect( () => {
    const fetchUsers = async (url) => {
      const response = await fetch(url)
      const users = await response.json()
      setData(users)
    }
    fetchUsers(url)
  }, [data.length])
// =================================================================== 

// ===================================================================
  return (
    
    <div> 
    
      {
       data.map(data => 
          <h1>{data.url}</h1>
          )
      }
    </div>
  )
}

export default App

from github-error-solve.

MohamedAlDeep avatar MohamedAlDeep commented on May 7, 2024

My problem is in fetching that url

from github-error-solve.

MohamedAlDeep avatar MohamedAlDeep commented on May 7, 2024

@devvsakib I JUST FOUND THE SOLUTION

from github-error-solve.

MohamedAlDeep avatar MohamedAlDeep commented on May 7, 2024

image

from github-error-solve.

MohamedAlDeep avatar MohamedAlDeep commented on May 7, 2024

for a reason i dont know it keeps repeating

from github-error-solve.

MohamedAlDeep avatar MohamedAlDeep commented on May 7, 2024

bruh its not working now

from github-error-solve.

devvsakib avatar devvsakib commented on May 7, 2024

Im in nutshell with these API'sπŸ˜‚ I wrote some code but didn't test it. I have to do an assignment tooπŸ˜‚

I will suggest you try all this API fetch in vanilla javascript. first, fetch contributors then again users.πŸ‘€

from github-error-solve.

MohamedAlDeep avatar MohamedAlDeep commented on May 7, 2024

Yes, that is good idea but for now i cant because it says "rate limiting" when opening the contributors API πŸ˜‚

from github-error-solve.

devvsakib avatar devvsakib commented on May 7, 2024

Closed as complete #115

from github-error-solve.

Related Issues (20)

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.