{"_id":"550ada9e921b7d0d00228888","version":{"_id":"550ada9d921b7d0d00228876","forked_from":"550a3b2542fff40d00ae5ffb","project":"550a379f635c660d00527fd8","__v":3,"createdAt":"2015-03-19T14:18:05.245Z","releaseDate":"2015-03-19T14:18:05.245Z","categories":["550ada9d921b7d0d00228877","550ada9d921b7d0d00228878","550ada9d921b7d0d00228879","550ada9d921b7d0d0022887a","550ada9d921b7d0d0022887b","550ada9d921b7d0d0022887c","550ada9d921b7d0d0022887d","5523e61e71c0542100993493","55246f72ccc28a0d0062c560"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3.0.0"},"user":"550a378e635c660d00527fd7","project":"550a379f635c660d00527fd8","category":{"_id":"550ada9d921b7d0d0022887b","__v":1,"pages":["550ada9e921b7d0d00228888","550ada9e921b7d0d00228889","550ada9e921b7d0d0022888a","550ada9e921b7d0d0022888b"],"version":"550ada9d921b7d0d00228876","project":"550a379f635c660d00527fd8","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-03-19T02:59:32.696Z","from_sync":false,"order":6,"slug":"resources","title":"Resources"},"__v":44,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-03-19T02:59:44.058Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Snoocore strictly follows [Semantic Versioning](http://semver.org/). All MAJOR version bumps will have **breaking changes**. Other entries in the migration guide are of most likely going to be new features that may replace an older one in a **backwards compatible** way.\n\nA list of migration steps ordered from most recently changed:\n\n- [MAJOR — 2.x.x to 3.x.x](#major--2xx-to-3xx)\n- [MAJOR — 1.x.x to 2.x.x](#major--1xx-to-2xx)\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"MAJOR — `2.x.x` to `3.x.x`\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Breaking Changes\"\n}\n[/block]\n### Removal of Cookie based authentication\n\nAll users will need to make the switch to OAuth based authentication. Reddit has deprecated the Cookie based logins. Developers have till August 2015 to make the switch. Stick to the 2.x.x version of Snoocore if you still need Cookie login support for a little bit longer.\n\n### New OAuth configuration\n\n**OAuth keys and secrets**\n\nThe key / secret fields in the OAuth configuration have been made shorter. Simply make the following change:\n\n- `consumerKey` → `key`\n- `consumerSecret` → `secret` \n\n**Script based OAuth configuration changes**\n\nThere is no longer a cookie based login option, so the login configuration has been removed. The username & password fields have moved into the OAuth settings. \n\nFor script based OAuth change:\n\n- `login.username` → `oauth.username`\n- `login.password` → `oauth.password`\n\n### Removal of `reddit.raw`\n\nThe main `reddit` is *much* more lenient in 3.x.x. It takes over the role of `reddit.raw`. Every instance where you are currently using `reddit.raw` can be replaced with `reddit`.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// old\\nreddit.raw('https://oauth.reddit.com/foo/bar')\\n// new\\nreddit('/foo/bar');\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\nNote that there is no longer need to provide the domain as the *only* domain that we are using in 3.x.x is `oauth.reddit.com` due to the always OAuth approach that reddit's API is taking.\n\n### Removal of OAuth types web & installed\n\nShould switch to use OAuth type `'explicit'` or `'implicit'`. Read the documentation for more information on this. In short you were using type `'web'` previously, switch this to `'explicit'`.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"MAJOR — `1.x.x` to `2.x.x`\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Breaking Changes\"\n}\n[/block]\n** Breaking change**\n\nThe only breaking change is the removal of the \"dot syntax\" in favor of the \"path syntax\".\n\nChange all dot notation calls:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"reddit.api.v1.me.get(/* */)\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\nInto path notation:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"reddit('/api/v1/me').get(/* */)\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\nThis change was needed to allow for more lenient path parsing. The issue related to this can be [found here](https://github.com/trevorsenior/snoocore/issues/68).","excerpt":"It's always lovely when things break. Hopefully this helps out.","slug":"migration-guide","type":"basic","title":"Migration Guide"}

Migration Guide

It's always lovely when things break. Hopefully this helps out.

Snoocore strictly follows [Semantic Versioning](http://semver.org/). All MAJOR version bumps will have **breaking changes**. Other entries in the migration guide are of most likely going to be new features that may replace an older one in a **backwards compatible** way. A list of migration steps ordered from most recently changed: - [MAJOR — 2.x.x to 3.x.x](#major--2xx-to-3xx) - [MAJOR — 1.x.x to 2.x.x](#major--1xx-to-2xx) [block:api-header] { "type": "basic", "title": "MAJOR — `2.x.x` to `3.x.x`" } [/block] [block:callout] { "type": "danger", "title": "Breaking Changes" } [/block] ### Removal of Cookie based authentication All users will need to make the switch to OAuth based authentication. Reddit has deprecated the Cookie based logins. Developers have till August 2015 to make the switch. Stick to the 2.x.x version of Snoocore if you still need Cookie login support for a little bit longer. ### New OAuth configuration **OAuth keys and secrets** The key / secret fields in the OAuth configuration have been made shorter. Simply make the following change: - `consumerKey` → `key` - `consumerSecret` → `secret` **Script based OAuth configuration changes** There is no longer a cookie based login option, so the login configuration has been removed. The username & password fields have moved into the OAuth settings. For script based OAuth change: - `login.username` → `oauth.username` - `login.password` → `oauth.password` ### Removal of `reddit.raw` The main `reddit` is *much* more lenient in 3.x.x. It takes over the role of `reddit.raw`. Every instance where you are currently using `reddit.raw` can be replaced with `reddit`. [block:code] { "codes": [ { "code": "// old\nreddit.raw('https://oauth.reddit.com/foo/bar')\n// new\nreddit('/foo/bar');", "language": "javascript" } ] } [/block] Note that there is no longer need to provide the domain as the *only* domain that we are using in 3.x.x is `oauth.reddit.com` due to the always OAuth approach that reddit's API is taking. ### Removal of OAuth types web & installed Should switch to use OAuth type `'explicit'` or `'implicit'`. Read the documentation for more information on this. In short you were using type `'web'` previously, switch this to `'explicit'`. [block:api-header] { "type": "basic", "title": "MAJOR — `1.x.x` to `2.x.x`" } [/block] [block:callout] { "type": "danger", "title": "Breaking Changes" } [/block] ** Breaking change** The only breaking change is the removal of the "dot syntax" in favor of the "path syntax". Change all dot notation calls: [block:code] { "codes": [ { "code": "reddit.api.v1.me.get(/* */)", "language": "javascript" } ] } [/block] Into path notation: [block:code] { "codes": [ { "code": "reddit('/api/v1/me').get(/* */)", "language": "javascript" } ] } [/block] This change was needed to allow for more lenient path parsing. The issue related to this can be [found here](https://github.com/trevorsenior/snoocore/issues/68).