소스 검색

Mock tabla de resumenes por temporada

wilitp 4 년 전
부모
커밋
30017b5be1
2개의 변경된 파일89개의 추가작업 그리고 0개의 파일을 삭제
  1. 79 0
      app/src/api/mocks.ts
  2. 10 0
      app/src/api/tables.ts

+ 79 - 0
app/src/api/mocks.ts

@@ -16,6 +16,85 @@ export const mockRequest = (
 };
 
 export const mockPayloads = {
+  seasonsSummariesTable: `
+    [
+      {
+        "station": {
+          "name": "excepteur",
+          "code": "6dd49d1c-68ee-4e68-b993-0ca6489c478c"
+        },
+        "from": "2016-12-22T02:14:38 +03:00",
+        "to": "2015-12-02T10:22:04 +03:00",
+        "lt10": 30.48,
+        "gt30": 13.65,
+        "gt33": 21.98,
+        "grados_acumulados": 18.67,
+        "amplitud_termica": 19.95,
+        "precip_acumulada": 11.53,
+        "dias_para_igualar_temporada": -8
+      },
+      {
+        "station": {
+          "name": "excepteur",
+          "code": "6dd49d1c-68ee-4e68-b993-0ca6489c478c"
+        },
+        "from": "2014-08-02T04:29:26 +03:00",
+        "to": "2014-06-18T08:59:25 +03:00",
+        "lt10": 30.8,
+        "gt30": 15.51,
+        "gt33": 27.18,
+        "grados_acumulados": 15.31,
+        "amplitud_termica": 13.78,
+        "precip_acumulada": 15.58,
+        "dias_para_igualar_temporada": -2
+      },
+      {
+        "station": {
+          "name": "excepteur",
+          "code": "6dd49d1c-68ee-4e68-b993-0ca6489c478c"
+        },
+        "from": "2017-04-30T08:01:55 +03:00",
+        "to": "2021-05-03T05:35:16 +03:00",
+        "lt10": 19.58,
+        "gt30": 29.96,
+        "gt33": 17.12,
+        "grados_acumulados": 13.11,
+        "amplitud_termica": 31.6,
+        "precip_acumulada": 23.31,
+        "dias_para_igualar_temporada": -10
+      },
+      {
+        "station": {
+          "name": "excepteur",
+          "code": "6dd49d1c-68ee-4e68-b993-0ca6489c478c"
+        },
+        "from": "2016-07-28T06:30:57 +03:00",
+        "to": "2015-04-29T02:19:31 +03:00",
+        "lt10": 34.5,
+        "gt30": 24.31,
+        "gt33": 38.21,
+        "grados_acumulados": 18.47,
+        "amplitud_termica": 10.49,
+        "precip_acumulada": 24.36,
+        "dias_para_igualar_temporada": 7
+      },
+      {
+        "station": {
+          "name": "excepteur",
+          "code": "6dd49d1c-68ee-4e68-b993-0ca6489c478c"
+        },
+        "from": "2019-08-21T08:41:01 +03:00",
+        "to": "2014-07-05T03:50:04 +03:00",
+        "lt10": 12.94,
+        "gt30": 16.74,
+        "gt33": 21.02,
+        "grados_acumulados": 37.22,
+        "amplitud_termica": 31.71,
+        "precip_acumulada": 10.77,
+        "dias_para_igualar_temporada": -4
+      }
+    ]
+  `,
   general: `
     [
       {

+ 10 - 0
app/src/api/tables.ts

@@ -1,5 +1,15 @@
 import { mockPayloads, mockRequest } from "./mocks";
+// Quizas llamarlos table no hacia falta,
+// pero es preferible antes de que a alguien se le olvide usar un alias cuando importe estas funciones.
 
 export const generalTable = (from: string, to: string, year: string) => {
   return mockRequest(true, mockPayloads.general, null);
 };
+
+export const seasonsSummariesTable = (
+  from: string,
+  to: string,
+  year: string
+) => {
+  return mockRequest(true, mockPayloads.seasonsSummariesTable, null);
+};