Giter Site home page Giter Site logo

andyruwruw / andyruwruw Goto Github PK

View Code? Open in Web Editor NEW
195.0 1.0 158.0 2.37 MB

Github profile README.md with dynamic images generated from React.js components. Inspired by natemoo-re

Home Page: https://github.com/andyruwruw

TypeScript 100.00%
spotify chesscom profile-readme vercel-serverless reactjs

andyruwruw's Introduction

hello! here's a little about me:

i really like music ๐ŸŽง

inspired by natemoo-re

i was a frontend intern at chess.com โ™Ÿ๏ธ

luckily being good at chess wasn't a pre-req to the job

i'm a vue.js fanboy, but i do some other stuff too ๐Ÿ”จ

andyruwruw's People

Contributors

andyruwruw avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

andyruwruw's Issues

environment variables

can you mention the environment variables of spotify now-playing for deploying in vercel

Programming icons

Hey, how did you get those programming logos along with shadow? Don't say u edited all the pics & put the final pic here ๐Ÿ˜„

Dark Mode Beta

Github's new dark mode is hard to work with.

There is currently no way to apply CSS to the components rendered that dynamically change with dark vs. light mode. And no way to get it from the request.

The issue has already been brought up and it looks like Github will fix this soon. The repo will be updated with whatever change they decide on.

For now, the components are given a medium grey and transparent coloring to adjust to either mode, with the sacrifice of looking like poop on both.

Null converted to object in now playing

Hey there,

Set things up on my profile, thanks for the project it's really noice. Ran into issues though:

[GET] /now-playing
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at default_1 (/vercel/path3/api/now-playing.ts:54:16)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at Server.<anonymous> (/var/task/___vc_helpers.js:813:13)

JS/Web isn't my cup of tea, but tried a few things and figured I'd change this:

let audioFeatures: IAudioFeaturesResponse | object = null;
if (Object.keys(item).length) {
  audioFeatures = await trackAudioFeatures(item.id, Authorization);
}

to this

let audioFeatures: IAudioFeaturesResponse | object = null;
if(item) {
  if (Object.keys(item).length) {
    audioFeatures = await trackAudioFeatures(item.id, Authorization);
  }
} else {
  return res.status(500).end();
}

worked for me, not sure if it's clean or not. I'll shoot a PR if you're okay with it.

Top-played isn't working

I tried to implement your code on my own but I came across an error while trying to access the top-played api. The now playing works perfectly.

This is the error that I see when I go to logs in Vercel

18:14:55:85 2020-09-14T12:44:56.559Z acfb5386-6359-4ffb-aa48-dbc59adc39c2 ERROR Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"TypeError: Cannot read property 'map' of undefined","reason":{"errorType":"TypeError","errorMessage":"Cannot read property 'map' of undefined","stack":["TypeError: Cannot read property 'map' of undefined"," at /vercel/54876353/api/top-played.ts:24:34"," at Array.map (<anonymous>)"," at default_1 (/vercel/54876353/api/top-played.ts:23:61)"," at processTicksAndRejections (internal/process/task_queues.js:97:5)"," at Server.<anonymous> (/var/task/___now_helpers.js:813:13)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: TypeError: Cannot read property 'map' of undefined"," at process.<anonymous> (/var/runtime/index.js:35:15)"," at process.emit (events.js:327:22)"," at process.emit (/var/task/__sourcemap_support.js:587:21)"," at processPromiseRejections (internal/process/promises.js:209:33)"," at processTicksAndRejections (internal/process/task_queues.js:98:32)"]} Unknown application error occurred

Any help will be appreciated.
Thanks.

How to run the app locally ?

Steps to reproduce

(Without setting any API Key)

  • Clone your project
  • Run npm install
  • Run npm run start
  • Link up my Vercel account and then run the app on localhost:3000

Expected behavior

Happy web app running and I would expect to be able to reach /api/now-playing even though the API call would throw an error since I didn't set up the key.

Actual behavior

App crashes.

 This Serverless Function has crashed. 
Error: Cannot use import statement outside a module

error TS2688: Cannot find type definition file for 'dist'.
  The file is in the program because:
    Entry point for implicit type library 'dist'

error TS2688: Cannot find type definition file for 'lib'.
  The file is in the program because:
    Entry point for implicit type library 'lib'
    ```

I'm using Node 18.x btw

Last Played working for 10-20 seconds then returns 403

Hello,

I set everything up and got it working (sort off), but am running into an issue: Currently Playing works fine and 100% of the time when a music is playing, but when I pause the music, Last Played only works for the first 10 seconds or so and then the GET requests returns a 403 status. I have no clue where it can come from, especially since the documentation doesn't mention this API call to return a 403. Any clue ?

Breaking Change: User-Agent Contact Info Required

https://www.chess.com/news/view/breaking-change-user-agent-contact-info-required

Steps to reproduce

Run the app and open the page chess-games

Expected behavior

Get results

Actual behavior

WebapiError: Forbidden

Root cause

Error is coming from the chess-web-api API, the issue is already reported: andyruwruw/chess-web-api#35

Solution

Once the chess-web-api allows it, pass the user-agent as well:
src\api\chess.ts#35:

  const response: ICurrentDailyGamesResponse = await chessAPI.getPlayerCurrentDailyChess(
    Environment.getChessUsername(), Environment.getUserEmail());

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.