KristinaDudnyk / Coursework-Planner

Your coursework planner
0 stars 0 forks source link

[TECH ED] Prepare for live session #48

Open KristinaDudnyk opened 1 year ago

KristinaDudnyk commented 1 year ago

From Module-React created by Dedekind561: CodeYourFuture/Module-React#8

Link to the coursework

https://www.youtube.com/playlist?list=PLozA7cloMbPi1HcSAUUEm7eWEzQk_PRw5

Why are we doing this?

It is essential to start learning new concepts and ideas before Saturday's session. During the week, we expect you to get stuck and form questions about the new content so you can address misconceptions during Saturday's session. The prep work here will introduce you to the new concepts for the week.

Maximum time in hours (Tech has max 16 per week total)

3

How to get help

Share your blockers in your class channel https://syllabus.codeyourfuture.io/guides/asking-questions

How to submit

n/a

How to review

No response

Anything else?

No response

KristinaDudnyk commented 1 year ago

i) Three things that are part of the Node.js API are:

  1. File System (fs) Module: The fs module provides functions for interacting with the file system, allowing you to read, write, and manipulate files and directories.

  2. HTTP Module: The http module enables you to create HTTP servers and make HTTP requests, allowing you to build web applications or interact with web services.

  3. Events Module: The events module provides an event-driven architecture, allowing you to create and handle custom events in your Node.js applications.

ii) Three things that are part of the Jest API (JavaScript testing framework) are:

  1. Describe and Test Functions: Jest provides functions like describe and test to define test suites and individual test cases, respectively. These functions allow you to structure and organize your test code.

  2. Matchers: Jest offers a wide range of built-in matchers such as toBe, toEqual, and toContain to assert expected values or conditions in your tests. These matchers help you make assertions and validate the behavior of your code.

  3. Mocking and Spying: Jest includes features for mocking and spying on functions or modules. You can create mock implementations for dependencies, simulate behavior, and verify function calls or method invocations during testing.

iii) Three things that are part of the Spotify API (web-based API for music streaming) are:

  1. Authentication and Authorization: The Spotify API provides authentication mechanisms to verify the identity of users and obtain authorization to access their Spotify accounts. This enables developers to build applications that interact with user-specific data, playlists, and music recommendations.

  2. Music Metadata and Search: The Spotify API offers endpoints to retrieve music metadata, including information about artists, albums, tracks, and playlists. It allows developers to search for specific songs or albums based on various criteria such as title, artist, or genre.

  3. Music Playback and Audio Analysis: The Spotify API enables developers to control music playback within their applications. It provides methods to play, pause, skip, and adjust the volume of tracks. Additionally, the API provides access to audio analysis data, including features like tempo, energy, and key, which can be used for creating music visualizations or building recommendation systems.

iv) Jest is not a web-based API because it is a JavaScript testing framework primarily used for testing JavaScript code in various environments such as Node.js or browser-based applications. It does not provide web-specific functionality or interact directly with web services. Jest is designed for running tests in a local environment and does not require network communication.

On the other hand, Spotify is a web-based API because it exposes web services that developers can access via HTTP requests. It operates over the web and allows developers to integrate Spotify's music streaming functionality into their own web or mobile applications. Developers can interact with the Spotify API using standard web technologies like HTTP, JSON, and OAuth for authentication. The API provides access to music-related data and services hosted on Spotify's servers, making it a web-based API.