cloudfoundry-community / cloudfoundry-community/cf-python-client
Possibility to retrive includes?
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 55
- Forks
- 54
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hey, not sure if it's missing or I don't know how to exactly use it. However, I can't retrieve 'included' from any out of the box options eg. list, get, get_first. However, if I get retrieved payload from underlying methods then it's there. So I assume, parameter is passed while calling API, however, method returning payload only process 'resources' and 'included' is omitted.
Using CF CLI:
cf curl /v3/apps/9a81aaf5-7dac-4adc-a764-263b98935707?include=org | jq -r .included.organizations[].guid
42b716bb-42c5-4bcf-9c1c-f4be4d11685b
Using Python client:
app = client.v3.apps.get("9a81aaf5-7dac-4adc-a764-263b98935707", include="org")
print(json.dumps(app["included"], indent=4))
print(json.dumps(app["included"], indent=4))
KeyError: 'included'
By changing the first line only, a single request fetches all the data. The navigation from app to space and space to organization remains unchanged.
app = client.v3.apps.get("app-guid", include="space.organization")
The managers provide the same methods as the V2 managers with the following differences:
get(**kwargs): supports keyword arguments that are passed on to the API, e.g. "include"
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Reproduce el ejemplo con v3.apps.get(..., include="org") y compara su resultado con el payload devuelto por la solicitud subyacente. Rastrea cómo procesa el apps manager las respuestas de la API y, a continuación, verifica que los datos incluidos sigan disponibles y que el comportamiento de navegación existente siga funcionando para include="space.organization".
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- api
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100