Update URLs
This commit is contained in:
parent
7bcd0924b8
commit
be662c5825
2 changed files with 108 additions and 93 deletions
|
@ -232,7 +232,7 @@ class Re2oAPIClient:
|
||||||
|
|
||||||
def _view_for(self, obj_name, params={}, **kwargs):
|
def _view_for(self, obj_name, params={}, **kwargs):
|
||||||
return self.get(
|
return self.get(
|
||||||
self.get_url_for('%s-details' % obj_name, **kwargs),
|
self.get_url_for('%s-detail' % obj_name, **kwargs),
|
||||||
params=params
|
params=params
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ class Re2oAPIClient:
|
||||||
if name.endswith('-list'):
|
if name.endswith('-list'):
|
||||||
ret.append('list_%s' % name[:-len('-list')])
|
ret.append('list_%s' % name[:-len('-list')])
|
||||||
ret.append('count_%s' % name[:-len('-list')])
|
ret.append('count_%s' % name[:-len('-list')])
|
||||||
elif name.endswith('-details'):
|
elif name.endswith('-detail'):
|
||||||
ret.append('view_%s' % name[:-len('-details')])
|
ret.append('view_%s' % name[:-len('-detail')])
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
|
@ -1,96 +1,111 @@
|
||||||
from . import exceptions
|
from . import exceptions
|
||||||
|
|
||||||
urls = {
|
urls = {
|
||||||
'root': '/api/',
|
'root': '/api/',
|
||||||
'articles-list': '/api/cotisations/articles/',
|
'article-list': '/api/cotisations/article/',
|
||||||
'articles-details': '/api/cotisations/articles/{pk}/',
|
'article-detail': '/api/cotisations/article/{pk}/',
|
||||||
'banques-list': '/api/cotisations/banques/',
|
'banque-list': '/api/cotisations/banque/',
|
||||||
'banques-details': '/api/cotisations/banques/{pk}/',
|
'banque-detail': '/api/cotisations/banque/{pk}/',
|
||||||
'cotisations-list': '/api/cotisations/cotisations/',
|
'cotisation-list': '/api/cotisations/cotisation/',
|
||||||
'cotisations-details': '/api/cotisations/cotisations/{pk}/',
|
'cotisation-detail': '/api/cotisations/cotisation/{pk}/',
|
||||||
'factures-list': '/api/cotisations/factures/',
|
'facture-list': '/api/cotisations/facture/',
|
||||||
'factures-details': '/api/cotisations/factures/{pk}/',
|
'facture-detail': '/api/cotisations/facture/{pk}/',
|
||||||
'paiments-list': '/api/cotisations/paiements/',
|
'paiment-list': '/api/cotisations/paiement/',
|
||||||
'paiements-details': '/api/cotisations/paiements/{pk}/',
|
'paiement-detail': '/api/cotisations/paiement/{pk}/',
|
||||||
'ventes-list': '/api/cotisations/ventes/',
|
'vente-list': '/api/cotisations/vente/',
|
||||||
'ventes-details': '/api/cotisations/ventes/{pk}/',
|
'vente-detail': '/api/cotisations/vente/{pk}/',
|
||||||
'domains-list': '/api/machines/domains/',
|
'domain-list': '/api/machines/domain/',
|
||||||
'domains-details': '/api/machines/domains/{pk}/',
|
'domain-detail': '/api/machines/domain/{pk}/',
|
||||||
'extensions-list': '/api/machines/extensions/',
|
'extension-list': '/api/machines/extension/',
|
||||||
'extensions-details': '/api/machines/extensions/{pk}/',
|
'extension-detail': '/api/machines/extension/{pk}/',
|
||||||
'interfaces-list': '/api/machines/interfaces/',
|
'interface-list': '/api/machines/interface/',
|
||||||
'interfaces-details': '/api/machines/interfaces/{pk}/',
|
'interface-detail': '/api/machines/interface/{pk}/',
|
||||||
'iplists-list': '/api/machines/iplists/',
|
'iplist-list': '/api/machines/iplist/',
|
||||||
'iplists-details': '/api/machines/iplists/{pk}/',
|
'iplist-detail': '/api/machines/iplist/{pk}/',
|
||||||
'iptypes-list': '/api/machines/iptypes/',
|
'iptype-list': '/api/machines/iptype/',
|
||||||
'iptypes-details': '/api/machines/iptypes/{pk}/',
|
'iptype-detail': '/api/machines/iptype/{pk}/',
|
||||||
'ipv6lists-list': '/api/machines/ipv6lists/',
|
'ipv6list-list': '/api/machines/ipv6list/',
|
||||||
'ipv6lists-details': '/api/machines/ipv6lists/{pk}/',
|
'ipv6list-detail': '/api/machines/ipv6list/{pk}/',
|
||||||
'machines-list': '/api/machines/machines/',
|
'machine-list': '/api/machines/machine/',
|
||||||
'machines-details': '/api/machines/machines/{pk}/',
|
'machine-detail': '/api/machines/machine/{pk}/',
|
||||||
'machinetypes-list': '/api/machines/machinetypes/',
|
'machinetype-list': '/api/machines/machinetype/',
|
||||||
'machinetypes-details': '/api/machines/machinetypes/{pk}/',
|
'machinetype-detail': '/api/machines/machinetype/{pk}/',
|
||||||
'mx-list': '/api/machines/mx/',
|
'mx-list': '/api/machines/mx/',
|
||||||
'mx-details': '/api/machines/mx/{pk}/',
|
'mx-detail': '/api/machines/mx/{pk}/',
|
||||||
'nas-list': '/api/machines/nas/',
|
'nas-list': '/api/machines/nas/',
|
||||||
'nas-details': '/api/machines/nas/{pk}/',
|
'nas-detail': '/api/machines/nas/{pk}/',
|
||||||
'ns-list': '/api/machines/ns/',
|
'ns-list': '/api/machines/ns/',
|
||||||
'ns-details': '/api/machines/ns/{pk}/',
|
'ns-detail': '/api/machines/ns/{pk}/',
|
||||||
'ouvertureportlists-list': '/api/machines/ouvertureportlists/',
|
'ouvertureportlist-list': '/api/machines/ouvertureportlist/',
|
||||||
'ouvertureportlists-details': '/api/machines/ouvertureportlists/{pk}/',
|
'ouvertureportlist-detail': '/api/machines/ouvertureportlist/{pk}/',
|
||||||
'ouvertureports-list': '/api/machines/ouvertureports/',
|
'ouvertureport-list': '/api/machines/ouvertureport/',
|
||||||
'ouvertureports-details': '/api/machines/ouvertureports/{pk}/',
|
'ouvertureport-detail': '/api/machines/ouvertureport/{pk}/',
|
||||||
'servicelinks-list': '/api/machines/servicelinks/',
|
'servicelink-list': '/api/machines/servicelink/',
|
||||||
'servicelinks-details': '/api/machines/servicelinks/{pk}/',
|
'servicelink-detail': '/api/machines/servicelink/{pk}/',
|
||||||
'services-list': '/api/machines/services/',
|
'service-list': '/api/machines/service/',
|
||||||
'services-details': '/api/machines/services/{pk}/',
|
'service-detail': '/api/machines/service/{pk}/',
|
||||||
'soa-list': '/api/machines/soa/',
|
'soa-list': '/api/machines/soa/',
|
||||||
'soa-details': '/api/machines/soa/{pk}/',
|
'soa-detail': '/api/machines/soa/{pk}/',
|
||||||
'srv-list': '/api/machines/srv/',
|
'srv-list': '/api/machines/srv/',
|
||||||
'srv-details': '/api/machines/srv/{pk}/',
|
'srv-detail': '/api/machines/srv/{pk}/',
|
||||||
'txt-list': '/api/machines/txt/',
|
'txt-list': '/api/machines/txt/',
|
||||||
'txt-details': '/api/machines/txt/{pk}/',
|
'txt-detail': '/api/machines/txt/{pk}/',
|
||||||
'vlans-list': '/api/machines/vlans/',
|
'vlan-list': '/api/machines/vlan/',
|
||||||
'vlans-details': '/api/machines/vlans/{pk}',
|
'vlan-detail': '/api/machines/vlan/{pk}/',
|
||||||
'accesspoint-list': '/api/topologie/acesspoint/',
|
'optionaluser-detail': '/api/preferences/optionaluser/',
|
||||||
'accesspoint-details': '/api/topologie/acesspoint/{pk}/',
|
'optionalmachine-detail': '/api/preferences/optionalmachine/',
|
||||||
'building-list': '/api/topologie/building/',
|
'optionaltopologie-detail': '/api/preferences/optionaltopologie/',
|
||||||
'building-details': '/api/topologie/building/{pk}/',
|
'generaloption-detail': '/api/preferences/generaloption/',
|
||||||
'constructorswitch-list': '/api/topologie/constructorswitch/',
|
'homeservice-list': '/api/preferences/service/',
|
||||||
'contructorswitch-details': '/api/topologie/constructorswitch/{pk}/',
|
'homeservice-detail': '/api/preferences/service/{pk}/',
|
||||||
'modelswitch-list': '/api/topologie/modelswitch/',
|
'assooption-detail': '/api/preferences/assooption/',
|
||||||
'modelswitch-details': '/api/topologie/modelswitch/{pk}/',
|
'homeoption-detail': '/api/preferences/homeoption/',
|
||||||
'room-list': '/api/topologie/room/',
|
'mailmessageoption-detail': '/api/preferences/mailmessageoption/',
|
||||||
'room-details': '/api/topologie/room/{pk}/',
|
'accesspoint-list': '/api/topologie/acesspoint/',
|
||||||
'stack-list': '/api/topologie/stack/',
|
'accesspoint-detail': '/api/topologie/acesspoint/{pk}/',
|
||||||
'stack-details': '/api/topologie/stack/{pk}/',
|
'building-list': '/api/topologie/building/',
|
||||||
'switch-list': '/api/topologie/switch/',
|
'building-detail': '/api/topologie/building/{pk}/',
|
||||||
'switch-details': '/api/topologie/switch/{pk}/',
|
'constructorswitch-list': '/api/topologie/constructorswitch/',
|
||||||
'switchbay-list': '/api/topologie/switchbay/',
|
'constructorswitch-detail': '/api/topologie/constructorswitch/{pk}/',
|
||||||
'switchbay-details': '/api/topologie/switchbay/{pk}/',
|
'modelswitch-list': '/api/topologie/modelswitch/',
|
||||||
'switchport-list': '/api/topologie/switchport/',
|
'modelswitch-detail': '/api/topologie/modelswitch/{pk}/',
|
||||||
'switchport-details': '/api/topologie/switchport/{pk}/',
|
'room-list': '/api/topologie/room/',
|
||||||
'adherents-list': '/api/users/adherents/',
|
'room-detail': '/api/topologie/room/{pk}/',
|
||||||
'adherents-details': '/api/users/adherents/{pk}/',
|
'server-list': '/api/topologie/server/',
|
||||||
'bans-list': '/api/users/bans/',
|
'server-detail': '/api/topologie/server/{pk}/',
|
||||||
'bans-details': '/api/users/bans/{pk}/',
|
'stack-list': '/api/topologie/stack/',
|
||||||
'clubs-list': '/api/users/clubs/',
|
'stack-detail': '/api/topologie/stack/{pk}/',
|
||||||
'clubs-details': '/api/users/clubs/{pk}/',
|
'switch-list': '/api/topologie/switch/',
|
||||||
'listrights-list': '/api/users/listrights/',
|
'switch-detail': '/api/topologie/switch/{pk}/',
|
||||||
'listrights-details': '/api/users/listrights/{pk}/',
|
'switchbay-list': '/api/topologie/switchbay/',
|
||||||
'schools-list': '/api/users/schools/',
|
'switchbay-detail': '/api/topologie/switchbay/{pk}/',
|
||||||
'schools-details': '/api/users/schools/{pk}/',
|
'switchport-list': '/api/topologie/switchport/',
|
||||||
'serviceusers-list': '/api/users/serviceusers/',
|
'switchport-detail': '/api/topologie/switchport/{pk}/',
|
||||||
'serviceusers-details': '/api/users/serviceusers/{pk}/',
|
'adherent-list': '/api/users/adherent/',
|
||||||
'shells-list': '/api/users/shells/',
|
'adherent-detail': '/api/users/adherent/{pk}/',
|
||||||
'shells-details': '/api/users/shells/{pk}/',
|
'ban-list': '/api/users/ban/',
|
||||||
'users-list': '/api/users/users/',
|
'ban-detail': '/api/users/ban/{pk}/',
|
||||||
'users-details': '/api/users/users/{pk}/',
|
'club-list': '/api/users/club/',
|
||||||
'whitelists-list': '/api/users/whitelists/',
|
'club-detail': '/api/users/club/{pk}/',
|
||||||
'whitelists-details': '/api/users/whitelists/{pk}/',
|
'listright-list': '/api/users/listright/',
|
||||||
'hostmacip-list': '/api/dhcp/hostmacip/',
|
'listright-detail': '/api/users/listright/{pk}/',
|
||||||
'servicesregen-list': '/api/services/regen/',
|
'school-list': '/api/users/school/',
|
||||||
'token': '/api/token-auth/',
|
'school-detail': '/api/users/school/{pk}/',
|
||||||
|
'serviceuser-list': '/api/users/serviceuser/',
|
||||||
|
'serviceuser-detail': '/api/users/serviceuser/{pk}/',
|
||||||
|
'shell-list': '/api/users/shell/',
|
||||||
|
'shell-detail': '/api/users/shell/{pk}/',
|
||||||
|
'user-list': '/api/users/user/',
|
||||||
|
'user-detail': '/api/users/user/{pk}/',
|
||||||
|
'whitelist-list': '/api/users/whitelist/',
|
||||||
|
'whitelist-detail': '/api/users/whitelist/{pk}/',
|
||||||
|
'dnszones-list': '/api/dns/zones/',
|
||||||
|
'hostmacip-list': '/api/dhcp/hostmacip/',
|
||||||
|
'mailingstandard-list': '/api/mailing/standard/',
|
||||||
|
'mailingclub-list': '/api/mailing/club/',
|
||||||
|
'servicesregen-list': '/api/services/regen/',
|
||||||
|
'servicesregen-detail': '/api/services/regen/{pk}/',
|
||||||
|
'token': '/api/token-auth/',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue