cjapy 0.2.3.post4__tar.gz → 0.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {cjapy-0.2.3.post4 → cjapy-0.2.4}/PKG-INFO +1 -1
  2. cjapy-0.2.4/cjapy/__version__.py +1 -0
  3. {cjapy-0.2.3.post4 → cjapy-0.2.4}/cjapy/cjapy.py +56 -2
  4. {cjapy-0.2.3.post4 → cjapy-0.2.4}/cjapy/requestCreator.py +149 -46
  5. {cjapy-0.2.3.post4 → cjapy-0.2.4}/cjapy.egg-info/PKG-INFO +1 -1
  6. {cjapy-0.2.3.post4 → cjapy-0.2.4}/docs/cja.md +61 -28
  7. {cjapy-0.2.3.post4 → cjapy-0.2.4}/docs/releases.md +12 -4
  8. {cjapy-0.2.3.post4 → cjapy-0.2.4}/docs/requestCreator.md +19 -1
  9. cjapy-0.2.3.post4/cjapy/__version__.py +0 -1
  10. {cjapy-0.2.3.post4 → cjapy-0.2.4}/LICENSE +0 -0
  11. {cjapy-0.2.3.post4 → cjapy-0.2.4}/README.md +0 -0
  12. {cjapy-0.2.3.post4 → cjapy-0.2.4}/cjapy/__init__.py +0 -0
  13. {cjapy-0.2.3.post4 → cjapy-0.2.4}/cjapy/config.py +0 -0
  14. {cjapy-0.2.3.post4 → cjapy-0.2.4}/cjapy/configs.py +0 -0
  15. {cjapy-0.2.3.post4 → cjapy-0.2.4}/cjapy/connector.py +0 -0
  16. {cjapy-0.2.3.post4 → cjapy-0.2.4}/cjapy/projects.py +0 -0
  17. {cjapy-0.2.3.post4 → cjapy-0.2.4}/cjapy/token_provider.py +0 -0
  18. {cjapy-0.2.3.post4 → cjapy-0.2.4}/cjapy/workspace.py +0 -0
  19. {cjapy-0.2.3.post4 → cjapy-0.2.4}/cjapy.egg-info/SOURCES.txt +0 -0
  20. {cjapy-0.2.3.post4 → cjapy-0.2.4}/cjapy.egg-info/dependency_links.txt +0 -0
  21. {cjapy-0.2.3.post4 → cjapy-0.2.4}/cjapy.egg-info/requires.txt +0 -0
  22. {cjapy-0.2.3.post4 → cjapy-0.2.4}/cjapy.egg-info/top_level.txt +0 -0
  23. {cjapy-0.2.3.post4 → cjapy-0.2.4}/docs/authenticating_without_config_json.md +0 -0
  24. {cjapy-0.2.3.post4 → cjapy-0.2.4}/docs/getting_started.md +0 -0
  25. {cjapy-0.2.3.post4 → cjapy-0.2.4}/docs/logging.md +0 -0
  26. {cjapy-0.2.3.post4 → cjapy-0.2.4}/docs/main.md +0 -0
  27. {cjapy-0.2.3.post4 → cjapy-0.2.4}/docs/projects.md +0 -0
  28. {cjapy-0.2.3.post4 → cjapy-0.2.4}/docs/workspace.md +0 -0
  29. {cjapy-0.2.3.post4 → cjapy-0.2.4}/pyproject.toml +0 -0
  30. {cjapy-0.2.3.post4 → cjapy-0.2.4}/requirements.txt +0 -0
  31. {cjapy-0.2.3.post4 → cjapy-0.2.4}/setup.cfg +0 -0
  32. {cjapy-0.2.3.post4 → cjapy-0.2.4}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cjapy
3
- Version: 0.2.3.post4
3
+ Version: 0.2.4
4
4
  Summary: Adobe Customer Journey Analytics (CJA) wrapper
5
5
  Home-page: https://github.com/pitchmuc/cjapy
6
6
  Author: Julien Piccini
@@ -0,0 +1 @@
1
+ __version__ = "0.2.4"
@@ -77,12 +77,31 @@ class CJA:
77
77
  """
78
78
  if self.loggingEnabled:
79
79
  self.logger.debug("getCurrentUser start")
80
- path = "/aresconfig/users/me"
80
+ path = "/configuration/users/me"
81
81
  params = {"useCache": useCache}
82
82
  if admin:
83
83
  params["expansion"] = "admin"
84
84
  res = self.connector.getData(self.endpoint + path, params=params, **kwargs)
85
85
  return res
86
+
87
+ def getUsers(self,limit:int=100,page:int=0)->list:
88
+ """
89
+ Get all the users in an organization.
90
+ Arguments:
91
+ limit : OPTIONAL : Number of result per request.
92
+ page : OPTIONAL : page used to request
93
+ """
94
+ path = "/configuration/org/users"
95
+ params = {'limit': limit,"page":page}
96
+ res = self.connector.getData(self.endpoint+path,params=params)
97
+ data = res.get('content',[])
98
+ last_page = res.get('lastPage',True)
99
+ while last_page == False:
100
+ params["page"] += 1
101
+ res = self.connector.getData(self.endpoint+path,params=params)
102
+ data += res.get('content',[])
103
+ last_page = res.get('lastPage',True)
104
+ return data
86
105
 
87
106
  def getCalculatedMetrics(
88
107
  self,
@@ -309,6 +328,40 @@ class CJA:
309
328
  path = f"/componentmetadata/shares/{shareId}"
310
329
  res = self.connector.deleteData(self.endpoint + path)
311
330
  return res
331
+
332
+ def getAssetCount(self, imsUserId:str=None)->list:
333
+ """
334
+ Get the assets own by a specific user.
335
+ Arguments:
336
+ imsUserId : REQUIRED : The user ID owning the assets.
337
+ """
338
+ if imsUserId is None:
339
+ raise ValueError("Require an IMS user ID")
340
+ path = f"/componentmetadata/assets/{imsUserId}/counts"
341
+ res = self.connector.getData(self.endpoint+path)
342
+ return res
343
+
344
+ def transferAssets(self,imsUserId:str=None,assets:list=None)->list:
345
+ """
346
+ Transfer the assets own by a specific user.
347
+ Arguments:
348
+ imsUserId : REQUIRED : The user ID to transfer the assets to.
349
+ assets : REQUIRED : The list of assets to be transfered.
350
+ Example:
351
+ [
352
+ {
353
+ "componentType": "string",
354
+ "componentIds": [
355
+ "string"
356
+ ]
357
+ }
358
+ ]
359
+ """
360
+ if imsUserId is None:
361
+ raise ValueError("Require an IMS user ID")
362
+ path = f"/componentmetadata/assets/{imsUserId}/transfer"
363
+ res = self.connector.putData(self.endpoint+path,data=assets)
364
+ return res
312
365
 
313
366
  def searchShares(
314
367
  self, data: dict = None, full: bool = False, limit: int = 10
@@ -2052,7 +2105,8 @@ class CJA:
2052
2105
  ### table columnIds and StaticRow IDs
2053
2106
  tableColumnIds = {
2054
2107
  obj["columnId"]: obj.get("filters",[])[0]
2055
- for obj in dataRequest["metricContainer"]["metrics"]
2108
+ for obj
2109
+ in dataRequest["metricContainer"]["metrics"]
2056
2110
  }
2057
2111
  ### create relations for metrics with Filter on top
2058
2112
  filterRelations = {
@@ -93,13 +93,26 @@ class RequestCreator:
93
93
  "last7daysTodayIncluded": f"{seven_days_prior_iso}/{endToday_iso}",
94
94
  }
95
95
  self.today = today
96
+ self.__static_row_nb = 1
97
+ self.STATIC_ROW_REPORT = False
96
98
 
97
99
  def __repr__(self):
100
+ if 'dimensions' in self.__request.keys() or 'dimension' in self.__request.keys():
101
+ if self.__request.get('dimension',None) == "":
102
+ del self.__request['dimension']
103
+ if self.__request.get('dimensions',None) == "":
104
+ del self.__request['dimensions']
105
+
98
106
  return json.dumps(self.__request, indent=4)
99
107
 
100
108
  def __str__(self):
109
+ if 'dimensions' in self.__request.keys() or 'dimension' in self.__request.keys():
110
+ if self.__request.get('dimension',None) == "":
111
+ del self.__request['dimension']
112
+ if self.__request.get('dimensions',None) == "":
113
+ del self.__request['dimensions']
101
114
  return json.dumps(self.__request, indent=4)
102
-
115
+
103
116
  def addMetric(
104
117
  self,
105
118
  metricId: str = None,
@@ -245,9 +258,37 @@ class RequestCreator:
245
258
  allocationModel["lastWeight"] = lastWeight
246
259
 
247
260
  metric["allocationModel"] = allocationModel
248
-
249
- self.__request["metricContainer"]["metrics"].append(metric)
250
- self.__metricCount += 1
261
+ if self.STATIC_ROW_REPORT:
262
+ ## filter only the static row to add
263
+ list_static_rows = [comp for comp in self.__request["metricContainer"]["metricFilters"] if 'STATIC_ROW_COMPONENT' in comp['id']]
264
+ unique_static_row_ids = set()
265
+ list_comp_add = []
266
+ for static_row in list_static_rows:
267
+ if static_row['type'] == 'segment':
268
+ if static_row['segmentId'] not in unique_static_row_ids:
269
+ list_comp_add.append({'segmentId' : static_row['segmentId'],'type':'segment'})
270
+ unique_static_row_ids.add(static_row['segmentId'])
271
+ elif static_row['type'] == 'daterange':
272
+ if static_row['dateRangeId'] not in unique_static_row_ids:
273
+ list_comp_add.append({'dateRangeId' : static_row['dateRangeId'],'type':'dateRange'})
274
+ unique_static_row_ids.add(static_row['dateRangeId'])
275
+ list_metrics = []
276
+ list_metricFilters = []
277
+ staticRowCount = self.__static_row_nb
278
+ for static_row in list_comp_add:
279
+ filterRow = deepcopy(static_row)
280
+ filterRow['id'] = f"STATIC_ROW_COMPONENT_{deepcopy(staticRowCount)}"
281
+ list_metricFilters.append(filterRow)
282
+ new_metric = deepcopy(metric)
283
+ new_metric['columnId'] = f"{metric['id']}:::{deepcopy(staticRowCount)-1}"
284
+ new_metric["filters"] = [ f"STATIC_ROW_COMPONENT_{deepcopy(staticRowCount)}"]
285
+ list_metrics.append(new_metric)
286
+ staticRowCount +=2
287
+ self.__request["metricContainer"]["metrics"] += list_metrics
288
+ self.__request["metricContainer"]["metricFilters"] += list_metricFilters
289
+ else:
290
+ self.__request["metricContainer"]["metrics"].append(metric)
291
+ self.__metricCount += 1
251
292
 
252
293
  def getMetrics(self) -> list:
253
294
  """
@@ -256,63 +297,120 @@ class RequestCreator:
256
297
  return [metric["id"] for metric in self.__request["metricContainer"]["metrics"]]
257
298
 
258
299
  def addMetricFilter(
259
- self, metricId: str = None, filterId: str = None, metricIndex: int = None
300
+ self, metricId: str = None, filterId: str = None, metricIndex: int = None, staticRow:bool=False
260
301
  ) -> None:
261
302
  """
262
303
  Add a filter to a metric.
263
304
  Arguments:
264
- metricId : REQUIRED : metric where the filter is added
305
+ metricId : REQUIRED : metric where the filter is added. For breakdown, use "all".
265
306
  filterId : REQUIRED : The filter to add.
266
307
  when breakdown, use the following format for the value "dimension:::itemId"
267
308
  metricIndex : OPTIONAL : If used, set the filter to the metric located on that index.
309
+ staticRow : OPTIONAL : If you wish to add this as a static row (bool, default False)
268
310
  """
269
311
  if metricId is None:
270
312
  raise ValueError("Require a metric ID")
271
313
  if filterId is None:
272
314
  raise ValueError("Require a filter ID")
273
315
  filterIdCount = self.__metricFilterCount
274
- if filterId.startswith("s") and "@AdobeOrg" in filterId:
275
- filterType = "segment"
276
- filter = {
277
- "id": str(filterIdCount),
278
- "type": filterType,
279
- "segmentId": filterId,
280
- }
281
- elif filterId.startswith("20") and "/20" in filterId:
282
- filterType = "dateRange"
283
- filter = {
284
- "id": str(filterIdCount),
285
- "type": filterType,
286
- "dateRange": filterId,
287
- }
288
- elif ":::" in filterId:
289
- filterType = "breakdown"
290
- dimension, itemId = filterId.split(":::")
291
- filter = {
292
- "id": str(filterIdCount),
293
- "type": filterType,
294
- "dimension": dimension,
295
- "itemId": itemId,
296
- }
297
- else: ### case when it is predefined segments like "All_Visits"
298
- filterType = "segment"
299
- filter = {
300
- "id": str(filterIdCount),
301
- "type": filterType,
302
- "segmentId": filterId,
303
- }
316
+ staticRowCount = self.__static_row_nb
317
+ filters = []
318
+ staticRowCreated = []
319
+ if staticRow:
320
+ self.STATIC_ROW_REPORT = True
321
+ if filterId.startswith("s") and "@AdobeOrg" in filterId:
322
+ filterType = "segment"
323
+ elementKey = "segmentId"
324
+ elif filterId.startswith("20") and "/20" in filterId:
325
+ filterType = "dateRange"
326
+ elementKey = "dateRangeId"
327
+ else:
328
+ filterType = "segment"
329
+ elementKey = "segmentId"
330
+ for i in range(len(self.__request['metricContainer']['metrics'])):
331
+ staticRowName = f"STATIC_ROW_COMPONENT_{staticRowCount}"
332
+ filter = deepcopy({
333
+ "id": staticRowName,
334
+ "type": filterType,
335
+ elementKey: filterId,
336
+ })
337
+ staticRowCreated.append(staticRowName)
338
+ filters.append(filter)
339
+ staticRowCount +=2
340
+ self.__static_row_nb = staticRowCount
341
+ else:## not static row
342
+ if filterId.startswith("s") and "@AdobeOrg" in filterId:
343
+ filterType = "segment"
344
+ idFilter = str(filterIdCount)
345
+ filter = {
346
+ "id": idFilter,
347
+ "type": filterType,
348
+ "segmentId": filterId,
349
+ }
350
+ filters.append(filter)
351
+ elif filterId.startswith("20") and "/20" in filterId:
352
+ filterType = "dateRange"
353
+ idFilter = str(filterIdCount)
354
+ filter = {
355
+ "id": idFilter,
356
+ "type": filterType,
357
+ "dateRange": filterId,
358
+ }
359
+ filters.append(filter)
360
+ elif ":::" in filterId:
361
+ filterType = "breakdown"
362
+ dimension, itemId = filterId.split(":::")
363
+ filter = {
364
+ "id": str(filterIdCount),
365
+ "type": filterType,
366
+ "dimension": dimension,
367
+ "itemId": itemId,
368
+ }
369
+ filters.append(filter)
370
+ else: ### case when it is predefined segments like "All_Visits"
371
+ filterType = "segment"
372
+ idFilter = str(filterIdCount)
373
+ filter = {
374
+ "id": idFilter,
375
+ "type": filterType,
376
+ "segmentId": filterId,
377
+ }
378
+ filters.append(filter)
304
379
  if filterIdCount == 0:
305
- self.__request["metricContainer"]["metricFilters"] = [filter]
380
+ self.__request["metricContainer"]["metricFilters"] = filters
306
381
  else:
307
- self.__request["metricContainer"]["metricFilters"].append(filter)
382
+ self.__request["metricContainer"]["metricFilters"] += filters
308
383
  ### adding filter to the metric
309
384
  if metricIndex is None:
310
- for metric in self.__request["metricContainer"]["metrics"]:
311
- if metric["id"] == metricId:
385
+ replicateMetric = []
386
+ for index, metric in enumerate(self.__request["metricContainer"]["metrics"]):
387
+ if metricId == "all":
388
+ staticRowName = staticRowCreated[index]
389
+ row_index = int(deepcopy(staticRowName).split('_').pop())-1
390
+ columnId = metric['id']+f":::{row_index}"
391
+ if "filters" in metric.keys():
392
+ filtersCheck = [True if "STATIC_ROW_COMPONENT" in el else False for el in metric['filters']]
393
+ if any(filtersCheck): ## check if already a static row
394
+ replicateMetric.append(
395
+ {
396
+ "columnId" : columnId,
397
+ "id" : metric['id'],
398
+ "filters":[staticRowName]
399
+ }
400
+ )
401
+ else:
402
+ metric["filters"].append(staticRowName)
403
+ metric['columnId'] = columnId
404
+ else:
405
+ metric["filters"] = [staticRowName]
406
+ metric['columnId'] = columnId
407
+ elif metric["id"] == metricId:
312
408
  if "filters" in metric.keys():
313
409
  metric["filters"].append(str(filterIdCount))
314
410
  else:
315
411
  metric["filters"] = [str(filterIdCount)]
412
+ if len(replicateMetric)>0:
413
+ self.__request["metricContainer"]["metrics"] += replicateMetric
316
414
  else:
317
415
  metric = self.__request["metricContainer"]["metrics"][metricIndex]
318
416
  if "filters" in metric.keys():
@@ -320,7 +418,10 @@ class RequestCreator:
320
418
  else:
321
419
  metric["filters"] = [str(filterIdCount)]
322
420
  ### incrementing the filter counter
323
- self.__metricFilterCount += 1
421
+ if staticRow:
422
+ self.__metricFilterCount += len(staticRowCreated)
423
+ else:
424
+ self.__metricFilterCount += 1
324
425
 
325
426
  def removeMetricFilter(self, filterId: str = None) -> None:
326
427
  """
@@ -444,9 +545,7 @@ class RequestCreator:
444
545
  """
445
546
  if order not in ["asc", "dsc"]:
446
547
  raise ValueError("Sort order must be 'asc' or 'dsc'")
447
-
448
548
  self.__request["settings"]["dimensionSort"] = order
449
-
450
549
  # Remove sort from all metrics if dimension sort is set
451
550
  for metric in self.__request["metricContainer"]["metrics"]:
452
551
  if "sort" in metric:
@@ -459,14 +558,13 @@ class RequestCreator:
459
558
  dimension : REQUIRED : the dimension to build your report on
460
559
  sort_order : OPTIONAL : The sort order, either "asc" or "desc".
461
560
  """
561
+ if self.STATIC_ROW_REPORT:
562
+ raise Exception('This Request has been started as STATIC ROW REQUEST.\nCreate another RequestCreator instance for building it via dimension.')
462
563
  if dimension is None:
463
564
  raise ValueError("A dimension must be passed")
464
-
465
565
  if 'dimensions' in self.__request.keys():
466
566
  del self.__request["dimensions"]
467
-
468
567
  self.__request["dimension"] = dimension
469
-
470
568
  if sort_order:
471
569
  self.setDimensionSort(sort_order)
472
570
 
@@ -669,6 +767,11 @@ class RequestCreator:
669
767
  """
670
768
  Return the request definition
671
769
  """
770
+ if 'dimensions' in self.__request.keys() or 'dimension' in self.__request.keys():
771
+ if self.__request.get('dimension',None) == "":
772
+ del self.__request['dimension']
773
+ if self.__request.get('dimensions',None) == "":
774
+ del self.__request['dimensions']
672
775
  return deepcopy(self.__request)
673
776
 
674
777
  def save(self, fileName: str = None) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cjapy
3
- Version: 0.2.3.post4
3
+ Version: 0.2.4
4
4
  Summary: Adobe Customer Journey Analytics (CJA) wrapper
5
5
  Home-page: https://github.com/pitchmuc/cjapy
6
6
  Author: Julien Piccini
@@ -46,6 +46,9 @@ List of GET methods:
46
46
  * getCurrentUser
47
47
  return the current user
48
48
 
49
+ * getUsers
50
+ returns a list of all users with their IMS ID.
51
+
49
52
  * getCalculatedMetrics
50
53
  Returns a dataframe or the list of calculated Metrics.
51
54
  Arguments
@@ -272,6 +275,11 @@ List of GET methods:
272
275
  Arguments:
273
276
  * connectionId : REQUIRED : the connection ID (without prefix)
274
277
 
278
+ * getAssetCount
279
+ Get the assets own by a specific user.
280
+ Arguments:
281
+ * imsUserId : REQUIRED : The user ID owning the assets.
282
+
275
283
 
276
284
  ## Create methods
277
285
 
@@ -397,42 +405,48 @@ On each method docstring, I tried to tell if it is a PUT or a PATCH method.
397
405
  For each component object in the passed list, the given shares will replace the current set of shares for each component.
398
406
  Arguments:
399
407
  * data : REQUIRED : list of dictionary containing the component to share.
400
- Example [
408
+ Example
409
+ ```py
410
+ [
411
+ {
412
+ "componentType": "string",
413
+ "componentId": "string",
414
+ "shares": [
401
415
  {
402
- "componentType": "string",
403
- "componentId": "string",
404
- "shares": [
405
- {
406
- "shareToId": 0,
407
- "shareToImsId": "string",
408
- "shareToType": "string",
409
- "accessLevel": "string"
410
- }
411
- ]
416
+ "shareToId": 0,
417
+ "shareToImsId": "string",
418
+ "shareToType": "string",
419
+ "accessLevel": "string"
412
420
  }
421
+ ]
422
+ }
413
423
  ]
424
+ ```
414
425
  * useCache : OPTIONAL : Boolean to use caching. Default is True.
415
426
 
416
427
  * updateTags: This endpoint allows many tags at once to be created/deleted. PUT method.
417
428
  Any tags passed to this endpoint will become the only tags for that componentId (all other tags will be removed).
418
429
  Arguments:
419
430
  * data : REQUIRED : List of tags and component to be tagged.
420
- Example [
421
- {
422
- "componentType": "string",
423
- "componentId": "string",
424
- "tags": [
425
- {
426
- "id": 0,
427
- "name": "string",
428
- "description": "string",
429
- "components": [
430
- null
431
- ]
432
- }
433
- ]
434
- }
435
- ]
431
+ Example
432
+ ```py
433
+ [
434
+ {
435
+ "componentType": "string",
436
+ "componentId": "string",
437
+ "tags": [
438
+ {
439
+ "id": 0,
440
+ "name": "string",
441
+ "description": "string",
442
+ "components": [
443
+ null
444
+ ]
445
+ }
446
+ ]
447
+ }
448
+ ]
449
+ ```
436
450
 
437
451
  * updateDataView: Update the Data View definition (PUT method)
438
452
  Arguments:
@@ -474,13 +488,16 @@ On each method docstring, I tried to tell if it is a PUT or a PATCH method.
474
488
  * searchShares: Search for multiple shares on component based on the data passed.
475
489
  Arguments:
476
490
  * data : REQUIRED : dictionary specifying the search.
477
- example: {
491
+ example:
492
+ ```py
493
+ {
478
494
  "componentType": "string",
479
495
  "componentIds": [
480
496
  "string"
481
497
  ],
482
498
  "dataId": "string"
483
499
  }
500
+ ```
484
501
  * full : OPTIONAL : add additional data in the results.(Default False)
485
502
  * limit : OPTIONAL : number of result per page (10 per default)
486
503
 
@@ -510,6 +527,22 @@ On each method docstring, I tried to tell if it is a PUT or a PATCH method.
510
527
  Arguments:
511
528
  * projectDefinition : REQUIRED : the project dictionary defining the creation.
512
529
 
530
+ * transferAssets: Transfer the assets to a specific user.
531
+ Arguments:
532
+ * imsUserId : REQUIRED : The user ID to transfer the assets to.
533
+ * assets : REQUIRED : The list of assets to be transfered.
534
+ Example:
535
+ ```py
536
+ [
537
+ {
538
+ "componentType": "string",
539
+ "componentIds": [
540
+ "string"
541
+ ]
542
+ }
543
+ ]
544
+ ```
545
+
513
546
  ### Get report
514
547
 
515
548
  The `getReport` from CJA is actually a POST method.\
@@ -3,6 +3,18 @@
3
3
  This page will give you the change that are occuring when a new version has been published on pypi.
4
4
  The changes have been tracked starting version 0.1.0
5
5
 
6
+ ## 0.2.4
7
+ * adding the `getUsers` method
8
+ * adding the `getAssetCount` method
9
+ * better support for STATIC_ROW in `RequestCreator`
10
+
11
+ ## 0.2.3
12
+ * adding the `getPersonProfiles` method
13
+ * adding the `getFreeformTable` method
14
+ * adding attribution model possibility to addMetric in `RequestCreator`
15
+ * adding `setDateRange` method in `RequestCreator`
16
+ * supporting adhoc filter in `RequestCreator`
17
+
6
18
  ## 0.2.2
7
19
 
8
20
  * fixing issue on `Project` class for specific project with dynamic filtering
@@ -14,10 +26,6 @@ Patch:
14
26
  * Adding more parameters for `createDataView` methods
15
27
  * Fixing `updateCalculatedMetric`
16
28
  * Fixing the `setSearch`\
17
- Patch:
18
- * adding attribution model possibility to addMetric in `RequestCreator`
19
- * adding `setDateRange` method in `RequestCreator`
20
- * supporting adhoc filter in `RequestCreator`
21
29
 
22
30
  ## 0.2.1
23
31
 
@@ -4,10 +4,18 @@ The `cjapy` module provide a way for you to create request dictionary to CJA ser
4
4
  This class will provide you an instance that contains methods to modify your request definition.\
5
5
  In this documentation, we will review the different methods available.
6
6
 
7
+ ## Menu
8
+ - [RequestCreator instanciation](#requestCreator-instanciation)
9
+ - [Creating an empty request](#creating-an-empty-request)
10
+ - [Uploading a template request](#uploading-a-template-request)
11
+ - [Methods availables on RequestCreator](#methods-availables-on-requestCreator-instance)
12
+ - [RequestCreator Instance attributes](#requestCreator-instance-attributes)
13
+
7
14
  ## RequestCreator instanciation
8
15
 
9
16
  In order to generate an instance of the `RequestCreator`, once you have loaded the cjapy module, you can either directly call the class or pass an existing request definition.\
10
17
 
18
+
11
19
  ### Creating an empty request
12
20
 
13
21
  ```python
@@ -84,6 +92,8 @@ We will review the different methods available via the object.
84
92
 
85
93
  The `addMetric` method also supports various attribution models. For example, the `sameTouch` model is defined without a lookback window, while other models like `lastTouch` and `firstTouch` can have lookback windows and expiration settings. The `timeDecay` model allows specifying half-life periods and granularity, with defaults to 1 week if not provided.
86
94
 
95
+ The `addMetric` will automatically set the new metric pass to a static row report as Static metric row.
96
+
87
97
  Examples:
88
98
  ```python
89
99
  # Adding a simple metric
@@ -187,7 +197,7 @@ We will review the different methods available via the object.
187
197
  * shiftingDaysStart : OPTIONAL : An integer, if you want to add or remove days from the last first part of the current dateRange. Apply only to beginning of the dateRange.
188
198
  So 2020-01-01T00:00:00.000/2020-02-01T00:00:00.000 with +2 will give 2020-01-03T00:00:00.000/2020-02-01T00:00:00.000
189
199
 
190
- ## Instance attributes
200
+ ## RequestCreator Instance attributes
191
201
 
192
202
  At the moment, there are only limited attributes available on the instance of the `RequestCreator` class.
193
203
 
@@ -212,3 +222,11 @@ This can help you derive other dates if needed.
212
222
  ### search
213
223
 
214
224
  `search` attribute is a boolean defining if search has been set for the dimension.
225
+
226
+ ### STATIC_ROW_REPORT
227
+
228
+ Defines if the report has been built for STATIC ROW Report.\
229
+ Static row report means that metrics are being used with filters, without the usage of any dimensions.\
230
+ Once a report has been setup as STATIC ROW REPORT (value turns to `True`), you cannot add a dimension.\
231
+ Create a new instance of RequestCreator to create a report with a dimension.
232
+
@@ -1 +0,0 @@
1
- __version__ = "0.2.3-4"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes