Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
967 changes: 26 additions & 941 deletions reddit-front/documentations/NavBarComponents/global.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions reddit-front/documentations/NavBarComponents/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ <h3><code>npm run build</code> fails to minify</h3>
</div>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#AppBarReddit">AppBarReddit</a></li><li><a href="global.html#HomeBox">HomeBox</a></li><li><a href="global.html#IconsBox">IconsBox</a></li><li><a href="global.html#LogIn">LogIn</a></li><li><a href="global.html#Logo">Logo</a></li><li><a href="global.html#Profile">Profile</a></li><li><a href="global.html#ProfileLogin">ProfileLogin</a></li><li><a href="global.html#SearchBox">SearchBox</a></li><li><a href="global.html#SideDrawer">SideDrawer</a></li><li><a href="global.html#SignUp">SignUp</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#ChartCard">ChartCard</a></li><li><a href="global.html#ChartDiv">ChartDiv</a></li><li><a href="global.html#TrafficChart">TrafficChart</a></li><li><a href="global.html#TrafficStates">TrafficStates</a></li><li><a href="global.html#TrafficTab">TrafficTab</a></li><li><a href="global.html#TrafficTable">TrafficTable</a></li></ul>
</nav>

<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Sat Nov 12 2022 23:48:25 GMT+0200 (Eastern European Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Wed Dec 07 2022 11:21:26 GMT+0200 (Eastern European Standard Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
152 changes: 152 additions & 0 deletions reddit-front/documentations/TrafficStates/Service/Traffic.js.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: Traffic.js</title>

<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

<h1 class="page-title">Source: Traffic.js</h1>






<section>
<article>
<pre class="prettyprint source linenums"><code>import api from './api';

/**
* This service for fetching the Chart Data
*/

export const getTrafficChartData = async () => {
try {
const response = await api.get(
'/api/subreddit/traffic_states/traffic_chart_data'
);
if (response.status >= 200 &amp;&amp; response.status &lt; 300) {
console.log(response.data);
return response.data;
}
return null;
} catch (error) {
console.log(error);
return null;
}
};

/**
* This service for fetching the no. people joined this week for each day
*/

export const getTrafficTableJoinedThisWeek = async () => {
try {
const response = await api.get(
'/api/subreddit/traffic_states/traffic_table/joined_this_week'
);
if (response.status >= 200 &amp;&amp; response.status &lt; 300) {
console.log(response.data);
return response.data;
}
return null;
} catch (error) {
console.log(error);
return null;
}
};

/**
* This service for fetching the no. people joined this year for each month
*/

export const getTrafficTableJoinedThisYear = async () => {
try {
const response = await api.get(
'/api/subreddit/traffic_states/traffic_table/joined_this_year'
);
if (response.status >= 200 &amp;&amp; response.status &lt; 300) {
console.log(response.data);
return response.data;
}
return null;
} catch (error) {
console.log(error);
return null;
}
};

/**
* This service for fetching the no. people joined last week
*/

export const getTrafficLastWeek = async () => {
try {
const response = await api.get(
'/api/subreddit/traffic_states/total_last_week'
);
if (response.status >= 200 &amp;&amp; response.status &lt; 300) {
console.log(response.data);
return response.data;
}
return null;
} catch (error) {
console.log(error);
return null;
}
};

/**
* This service for fetching the no. people joined last month
*/

export const getTrafficLastMonth = async () => {
try {
const response = await api.get(
'/api/subreddit/traffic_states/total_last_month'
);
if (response.status >= 200 &amp;&amp; response.status &lt; 300) {
console.log(response.data);
return response.data;
}
return null;
} catch (error) {
console.log(error);
return null;
}
};
</code></pre>
</article>
</section>




</div>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#getTrafficChartData">getTrafficChartData</a></li><li><a href="global.html#getTrafficLastMonth">getTrafficLastMonth</a></li><li><a href="global.html#getTrafficLastWeek">getTrafficLastWeek</a></li><li><a href="global.html#getTrafficTableJoinedThisWeek">getTrafficTableJoinedThisWeek</a></li><li><a href="global.html#getTrafficTableJoinedThisYear">getTrafficTableJoinedThisYear</a></li></ul>
</nav>

<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Wed Dec 07 2022 11:30:02 GMT+0200 (Eastern European Standard Time)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>
Binary file not shown.
Loading