mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-23 14:46:26 +00:00
1 line
4.3 KiB
JavaScript
1 line
4.3 KiB
JavaScript
"use strict";(self.webpackChunkspotify_api_docs=self.webpackChunkspotify_api_docs||[]).push([[4002],{3905:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return f}});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=c(n),f=i,y=d["".concat(l,".").concat(f)]||d[f]||u[f]||o;return n?r.createElement(y,a(a({ref:t},p),{},{components:n})):r.createElement(y,a({ref:t},p))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,a=new Array(o);a[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:i,a[1]=s;for(var c=2;c<o;c++)a[c]=n[c];return r.createElement.apply(null,a)}return r.createElement.apply(null,n)}d.displayName="MDXCreateElement"},7945:function(e,t,n){n.r(t),n.d(t,{frontMatter:function(){return a},contentTitle:function(){return s},metadata:function(){return l},toc:function(){return c},default:function(){return u}});var r=n(3117),i=n(102),o=(n(7294),n(3905)),a={id:"utilities",title:"Utilities",sidebar_label:"Utilities"},s=void 0,l={unversionedId:"web/utilities",id:"version-5.1.1/web/utilities",isDocsHomePage:!1,title:"Utilities",description:"Paging-Methods",source:"@site/versioned_docs/version-5.1.1/web/utilities.md",sourceDirName:"web",slug:"/web/utilities",permalink:"/SpotifyAPI-NET/docs/5.1.1/web/utilities",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/versioned_docs/version-5.1.1/web/utilities.md",version:"5.1.1",lastUpdatedBy:"dependabot[bot]",lastUpdatedAt:1643139046,formattedLastUpdatedAt:"1/25/2022",frontMatter:{id:"utilities",title:"Utilities",sidebar_label:"Utilities"},sidebar:"version-5.1.1/someSidebar",previous:{title:"Tracks",permalink:"/SpotifyAPI-NET/docs/5.1.1/web/tracks"},next:{title:"Getting Started",permalink:"/SpotifyAPI-NET/docs/5.1.1/auth/getting_started"}},c=[{value:"Paging-Methods",id:"paging-methods",children:[]}],p={toc:c};function u(e){var t=e.components,n=(0,i.Z)(e,["components"]);return(0,o.kt)("wrapper",(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"paging-methods"},"Paging-Methods"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"SpotifyWebAPI")," features two paging-helper Methods, ",(0,o.kt)("inlineCode",{parentName:"p"},"GetNextPage(Paging<T> page)")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"GetPreviousPage(Paging<T> page)"),".\nBoth are an easy way to receive the next/previous page of a Paging-Object."),(0,o.kt)("p",null,"Sample:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-csharp"},'var playlistTracks = _spotify.GetPlaylistTracks("1122095781", "4EcNf2l8rXInbJOf3tQdgU", "", 50);\nwhile (true)\n{\n Console.WriteLine(playlistTracks.Items.Count);\n if (!playlistTracks.HasNextPage())\n break;\n playlistTracks = _spotify.GetNextPage(playlistTracks);\n}\n')))}u.isMDXComponent=!0}}]); |