Beispiel #1
0
 class Meta:
     queryset = Day.objects.all()
     authentication = ApiKeyAuthentication()
     authorization = UserObjectsOnlyAuthorization()
     filtering = {'id': ALL,
                  'description': ALL,
                  'workout': ALL_WITH_RELATIONS}
Beispiel #2
0
 class Meta:
     queryset = Workout.objects.all()
     authentication = ApiKeyAuthentication()
     authorization = UserObjectsOnlyAuthorization()
     filtering = {'id': ALL,
                  "comment": ALL,
                  "creation_date": ALL}
Beispiel #3
0
 class Meta:
     queryset = ScheduleStep.objects.all()
     authentication = ApiKeyAuthentication()
     authorization = UserObjectsOnlyAuthorization()
     filtering = {'id': ALL,
                  'schedule': ALL_WITH_RELATIONS,
                  'workout': ALL_WITH_RELATIONS}
Beispiel #4
0
 class Meta:
     queryset = NutritionPlan.objects.all()
     authentication = ApiKeyAuthentication()
     authorization = UserObjectsOnlyAuthorization()
     filtering = {'id': ALL,
                  'creation_date': ALL,
                  'description': ALL,
                  'has_goal_calories': ALL}
Beispiel #5
0
 class Meta:
     queryset = Meal.objects.all()
     authentication = ApiKeyAuthentication()
     authorization = UserObjectsOnlyAuthorization()
     filtering = {'id': ALL,
                  'order': ALL,
                  'plan': ALL_WITH_RELATIONS,
                  'time': ALL}
Beispiel #6
0
 class Meta:
     queryset = Set.objects.all()
     authentication = ApiKeyAuthentication()
     authorization = UserObjectsOnlyAuthorization()
     filtering = {'id': ALL,
                  'day': ALL_WITH_RELATIONS,
                  'order': ALL,
                  'sets': ALL}
Beispiel #7
0
 class Meta:
     queryset = Schedule.objects.all()
     authentication = ApiKeyAuthentication()
     authorization = UserObjectsOnlyAuthorization()
     filtering = {'id': ALL,
                  'is_active': ALL,
                  'is_loop': ALL,
                  'name': ALL}
Beispiel #8
0
 class Meta:
     queryset = WorkoutSession.objects.all()
     authentication = MultiAuthentication(SessionAuthentication(),
                                          ApiKeyAuthentication())
     authorization = UserObjectsOnlyAuthorization()
     filtering = {'id': ALL,
                  "date": ALL,
                  "time_start": ALL,
                  "time_end": ALL}
Beispiel #9
0
 class Meta:
     queryset = Setting.objects.all()
     authentication = ApiKeyAuthentication()
     authorization = UserObjectsOnlyAuthorization()
     filtering = {'id': ALL,
                  'exercise': ALL_WITH_RELATIONS,
                  'order': ALL,
                  'reps': ALL,
                  'set': ALL_WITH_RELATIONS}
Beispiel #10
0
 class Meta:
     queryset = MealItem.objects.all()
     authentication = ApiKeyAuthentication()
     authorization = UserObjectsOnlyAuthorization()
     filtering = {'id': ALL,
                  'amount': ALL,
                  'ingredient': ALL_WITH_RELATIONS,
                  'meal': ALL_WITH_RELATIONS,
                  'order': ALL,
                  'weight_unit': ALL_WITH_RELATIONS}
Beispiel #11
0
 class Meta:
     queryset = WorkoutLog.objects.all()
     authentication = ApiKeyAuthentication()
     authorization = UserObjectsOnlyAuthorization()
     filtering = {'id': ALL,
                  'date': ALL,
                  'exercise': ALL_WITH_RELATIONS,
                  'reps': ALL,
                  'weight': ALL,
                  'workout': ALL_WITH_RELATIONS}
Beispiel #12
0
 class Meta:
     queryset = WeightEntry.objects.all()
     authentication = ApiKeyAuthentication()
     authorization = UserObjectsOnlyAuthorization()
     filtering = {'id': ALL, 'date': ALL, 'weight': ALL}
Beispiel #13
0
 class Meta:
     excludes = ('is_temporary', )
     queryset = UserProfile.objects.all()
     authentication = ApiKeyAuthentication()
     authorization = UserObjectsOnlyAuthorization()