From b6666235c41bb583fbb941cd78ba2c920a8915c5 Mon Sep 17 00:00:00 2001 From: Jonathan Harris Date: Mon, 3 Jul 2017 14:27:31 +0100 Subject: [PATCH] Switch to eddn.edcd.io gateway and to new schemas --- README.md | 4 ++-- eddn.py | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 27ff7c96..db00af02 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,7 @@ EDMC supports this scenario if you run the second instance of E:D in a *differen EDMC doesn't support running two instances of E:D in the *same* user account. EDMC will only respond to the instance of E:D that you ran last. ### Error: Can't connect to EDDN -EDMC needs to talk to eddn-gateway.elite-markets.net on port 8080. If you consistently receive this error check that your router or VPN configuration allows port 8080 / tcp outbound. +EDMC needs to talk to eddn.edcd.io on port 4430. If you consistently receive this error check that your router or VPN configuration allows port 4430 / tcp outbound. ### Import failed: No ship loadout found Complex ship loadouts with Engineers' mods can cause you to hit an Internet Explorer / Edge limitation on the length of URLs. Switch to a browser that doesn't suck. @@ -264,7 +264,7 @@ Acknowledgements * Thanks to Cmdr Mila Strelok for the Spanish translation. * Thanks to Taras Velychko for the Ukranian translation. * Thanks to [Ian Norton](https://github.com/inorton) for plugin support. -* Thanks to [James Muscat](https://github.com/jamesremuscat) for [EDDN](https://github.com/jamesremuscat/EDDN/wiki) and to [Cmdr Anthor](https://github.com/AnthorNet) for the [stats](http://eddn-gateway.elite-markets.net/). +* Thanks to [Cmdr Anthor](https://github.com/EDSM-NET) and [James Muscat](https://github.com/jamesremuscat) for [EDDN](https://github.com/EDSM-NET/EDDN/wiki). * Thanks to [Andargor](https://github.com/Andargor) for the idea of using the “Companion” interface in [edce-client](https://github.com/Andargor/edce-client). * Uses [Python Keyring Lib](https://github.com/jaraco/keyring) by Jason R. Coombs, Kang Zhang, et al. * Uses [Sparkle](https://github.com/sparkle-project/Sparkle) by [Andy Matuschak](http://andymatuschak.org/) and the [Sparkle Project](https://github.com/sparkle-project). diff --git a/eddn.py b/eddn.py index 3205f14f..dfbba6b7 100644 --- a/eddn.py +++ b/eddn.py @@ -30,8 +30,8 @@ replayfile = None # For delayed messages class EDDN: - ### SERVER = 'http://localhost:8081/' # testing - SERVER = 'http://eddn-gateway.elite-markets.net:8080' + ### SERVER = 'http://localhost:8081' # testing + SERVER = 'https://eddn.edcd.io:4430' UPLOAD = '%s/upload/' % SERVER HEALTH = '%s/health_check/' % SERVER REPLAYPERIOD = 400 # Roughly two messages per second, accounting for send delays [ms] @@ -173,7 +173,7 @@ class EDDN: # Don't send empty commodities list - schema won't allow it if commodities: self.send(data['commander']['name'], { - '$schemaRef' : 'http://schemas.elite-markets.net/eddn/commodity/3' + (is_beta and '/test' or ''), + '$schemaRef' : 'https://eddn.edcd.io/schemas/commodity/3' + (is_beta and '/test' or ''), 'message' : { 'systemName' : data['lastSystem']['name'], 'stationName' : data['lastStarport']['name'], @@ -185,7 +185,7 @@ class EDDN: # Don't send empty modules list - schema won't allow it if data['lastStarport'].get('modules'): self.send(data['commander']['name'], { - '$schemaRef' : 'http://schemas.elite-markets.net/eddn/outfitting/2' + (is_beta and '/test' or ''), + '$schemaRef' : 'https://eddn.edcd.io/schemas/outfitting/2' + (is_beta and '/test' or ''), 'message' : { 'systemName' : data['lastSystem']['name'], 'stationName' : data['lastStarport']['name'], @@ -197,7 +197,7 @@ class EDDN: # Don't send empty ships list - shipyard data is only guaranteed present if user has visited the shipyard. if data['lastStarport'].get('ships'): self.send(data['commander']['name'], { - '$schemaRef' : 'http://schemas.elite-markets.net/eddn/shipyard/2' + (is_beta and '/test' or ''), + '$schemaRef' : 'https://eddn.edcd.io/schemas/shipyard/2' + (is_beta and '/test' or ''), 'message' : { 'systemName' : data['lastSystem']['name'], 'stationName' : data['lastStarport']['name'], @@ -207,7 +207,7 @@ class EDDN: def export_journal_entry(self, cmdr, is_beta, entry): msg = { - '$schemaRef' : 'http://schemas.elite-markets.net/eddn/journal/1' + (is_beta and '/test' or ''), + '$schemaRef' : 'https://eddn.edcd.io/schemas/journal/1' + (is_beta and '/test' or ''), 'message' : entry } if replayfile or self.load(): @@ -227,6 +227,6 @@ class EDDN: def export_blackmarket(self, cmdr, is_beta, msg): self.send(cmdr, { - '$schemaRef' : 'http://schemas.elite-markets.net/eddn/blackmarket/1' + (is_beta and '/test' or ''), + '$schemaRef' : 'https://eddn.edcd.io/schemas/blackmarket/1' + (is_beta and '/test' or ''), 'message' : msg })