Skip to content

Added /road endpoint for vegagerdin#483

Open
olafur164 wants to merge 5 commits into
apis-is:masterfrom
olafur164:feature/add-vegagerdin-endpoint
Open

Added /road endpoint for vegagerdin#483
olafur164 wants to merge 5 commits into
apis-is:masterfrom
olafur164:feature/add-vegagerdin-endpoint

Conversation

@olafur164

@olafur164 olafur164 commented Feb 23, 2019

Copy link
Copy Markdown

Added a new endpoint for road conditions in Iceland.
Source: Vegagerdin

Vegagerdin xml

Also has endpoints separating each region in Iceland.
South, North, West, East and more.

Checklist

  • Write tests
  • Write documentation
  • All regions added

@MiniGod MiniGod left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Comment thread endpoints/road/all.js Outdated
Comment thread endpoints/road/index.js Outdated
Comment thread endpoints/road/all.js Outdated
Comment thread endpoints/road/all.js Outdated
Comment thread endpoints/road/all.js Outdated
Comment thread endpoints/road/documentation.md Outdated
@MiniGod

MiniGod commented Feb 24, 2019

Copy link
Copy Markdown
Member

Do you know if we can get any info about the segments? Location or something?

@olafur164

olafur164 commented Feb 24, 2019

Copy link
Copy Markdown
Author

@MiniGod Added all the regions :)

@olafur164

Copy link
Copy Markdown
Author

@MiniGod any update on when / if this will be merged? :D

@MiniGod MiniGod left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply. Got some comments about coding style mostly to make this easier to maintain in the future

Comment thread endpoints/road/regions.js
@@ -0,0 +1,123 @@
/* eslint-disable */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this and follow the eslint rules

Comment thread endpoints/road/regions.js
resolve(segments)
})
})
const parseFeed = function (callback, data, regionUrl) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is almost the same in the index.js file. Please try to re-use functions between the files.

Comment thread endpoints/road/regions.js
Comment thread endpoints/road/index.js
/* eslint-disable no-plusplus */
/* eslint-disable no-prototype-builtins */
/* eslint-disable prefer-destructuring */
/* eslint-disable no-unneeded-ternary */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove these and follow the eslint rules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants