aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/ApiClient/ApiHelpers.cs
blob: 65b6495ab2cb66d1a257f8894342a6bd1e48ce58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System;

namespace MediaBrowser.Model.ApiClient
{
    public static class ApiHelpers
    {
        /// <summary>
        /// Gets the name of the slug.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <returns>System.String.</returns>
        public static string GetSlugName(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException("name");
            }

            return name.Replace('/', '-').Replace('?', '-').Replace('&', '-');
        }
    }
}