Facebook
Twitter
Pinterest
Tumblr
GitHub
RSS
  • DEV Home
  • Documentation
  • Reference
  • Download
Search Results for

    Show / Hide Table of Contents

    Class BaseApiService

    Class BaseApiService

    Inheritance
    System.Object
    BaseApiService
    Implements
    IService
    IRequiresRequest
    Namespace: MediaBrowser.Controller.Api
    Assembly: MediaBrowser.Controller.dll
    Syntax
    public class BaseApiService : IService, IRequiresRequest

    Constructors

    BaseApiService()

    Initializes a new instance of the System.Object class.

    Declaration
    public BaseApiService()

    Properties

    AuthorizationContext

    Declaration
    public IAuthorizationContext AuthorizationContext { get; set; }
    Property Value
    Type Description
    IAuthorizationContext

    LibraryManager

    Declaration
    public ILibraryManager LibraryManager { get; set; }
    Property Value
    Type Description
    ILibraryManager

    LocalizationManager

    Declaration
    public ILocalizationManager LocalizationManager { get; set; }
    Property Value
    Type Description
    ILocalizationManager

    Logger

    Gets or sets the logger.

    Declaration
    public ILogger Logger { get; set; }
    Property Value
    Type Description
    ILogger

    The logger.

    Request

    Gets or sets the request context.

    Declaration
    public IRequest Request { get; set; }
    Property Value
    Type Description
    IRequest

    The request context.

    ResultFactory

    Gets or sets the HTTP result factory.

    Declaration
    public IHttpResultFactory ResultFactory { get; set; }
    Property Value
    Type Description
    IHttpResultFactory

    The HTTP result factory.

    UserManager

    Declaration
    public IUserManager UserManager { get; set; }
    Property Value
    Type Description
    IUserManager

    Methods

    AddRecordingKeywordsToQuery(InternalItemsQuery, KeywordInfo[])

    Declaration
    public static void AddRecordingKeywordsToQuery(InternalItemsQuery query, KeywordInfo[] keywords)
    Parameters
    Type Name Description
    InternalItemsQuery query
    KeywordInfo[] keywords

    AssertAPIAvailable(User)

    Declaration
    protected void AssertAPIAvailable(User user)
    Parameters
    Type Name Description
    User user

    AssertCanEditItem(User, BaseItem)

    Declaration
    protected void AssertCanEditItem(User user, BaseItem item)
    Parameters
    Type Name Description
    User user
    BaseItem item

    AssertCanManageUser(Int64)

    Declaration
    protected void AssertCanManageUser(long userId)
    Parameters
    Type Name Description
    System.Int64 userId

    AssertCanManageUser(Int64, Boolean)

    Declaration
    protected void AssertCanManageUser(long userId, bool restrictUserPreferences)
    Parameters
    Type Name Description
    System.Int64 userId
    System.Boolean restrictUserPreferences

    AssertCanManageUser(String)

    Declaration
    protected void AssertCanManageUser(string userId)
    Parameters
    Type Name Description
    System.String userId

    GetArtist(String)

    Declaration
    protected MusicArtist GetArtist(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    MusicArtist

    GetArtist(String, IDataContext)

    Declaration
    protected MusicArtist GetArtist(string name, IDataContext dataContext)
    Parameters
    Type Name Description
    System.String name
    IDataContext dataContext
    Returns
    Type Description
    MusicArtist

    GetDirectoryNotFoundException(String)

    Declaration
    protected Exception GetDirectoryNotFoundException(string path)
    Parameters
    Type Name Description
    System.String path
    Returns
    Type Description
    System.Exception

    GetDtoOptions(IAuthorizationContext, Object)

    Declaration
    protected DtoOptions GetDtoOptions(IAuthorizationContext authContext, object request)
    Parameters
    Type Name Description
    IAuthorizationContext authContext
    System.Object request
    Returns
    Type Description
    DtoOptions

    GetFileNotFoundException(String)

    Declaration
    protected FileNotFoundException GetFileNotFoundException(string path)
    Parameters
    Type Name Description
    System.String path
    Returns
    Type Description
    System.IO.FileNotFoundException

    GetGameGenre(String)

    Declaration
    protected GameGenre GetGameGenre(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    GameGenre

    GetGameGenre(String, IDataContext)

    Declaration
    protected GameGenre GetGameGenre(string name, IDataContext dataContext)
    Parameters
    Type Name Description
    System.String name
    IDataContext dataContext
    Returns
    Type Description
    GameGenre

    GetGenre(String)

    Declaration
    protected Genre GetGenre(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    Genre

    GetGenre(String, IDataContext)

    Declaration
    protected Genre GetGenre(string name, IDataContext dataContext)
    Parameters
    Type Name Description
    System.String name
    IDataContext dataContext
    Returns
    Type Description
    Genre

    GetHeader(String)

    Declaration
    public string GetHeader(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    System.String

    GetItemByName(String, String)

    Declaration
    protected BaseItem GetItemByName(string name, string type)
    Parameters
    Type Name Description
    System.String name
    System.String type
    Returns
    Type Description
    BaseItem

    GetItemByName(String, String, IDataContext)

    Declaration
    protected BaseItem GetItemByName(string name, string type, IDataContext dataContext)
    Parameters
    Type Name Description
    System.String name
    System.String type
    IDataContext dataContext
    Returns
    Type Description
    BaseItem

    GetItemsQuery(BaseItem, BaseItemsRequest, DtoOptions, User, ILibraryManager, ILocalizationManager)

    Declaration
    protected InternalItemsQuery GetItemsQuery(BaseItem parentItem, BaseItemsRequest request, DtoOptions dtoOptions, User user, ILibraryManager libraryManager, ILocalizationManager localization)
    Parameters
    Type Name Description
    BaseItem parentItem
    BaseItemsRequest request
    DtoOptions dtoOptions
    User user
    ILibraryManager libraryManager
    ILocalizationManager localization
    Returns
    Type Description
    InternalItemsQuery

    GetItemsQuery(BaseItem, BaseItemsRequest, DtoOptions, User, IDataContext)

    Declaration
    protected InternalItemsQuery GetItemsQuery(BaseItem parentItem, BaseItemsRequest request, DtoOptions dtoOptions, User user, IDataContext dataContext)
    Parameters
    Type Name Description
    BaseItem parentItem
    BaseItemsRequest request
    DtoOptions dtoOptions
    User user
    IDataContext dataContext
    Returns
    Type Description
    InternalItemsQuery

    GetMusicGenre(String)

    Declaration
    protected MusicGenre GetMusicGenre(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    MusicGenre

    GetMusicGenre(String, IDataContext)

    Declaration
    protected MusicGenre GetMusicGenre(string name, IDataContext dataContext)
    Parameters
    Type Name Description
    System.String name
    IDataContext dataContext
    Returns
    Type Description
    MusicGenre

    GetPathValue(Int32)

    Declaration
    protected string GetPathValue(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    System.String

    GetPerson(String)

    Declaration
    protected Person GetPerson(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    Person

    GetPerson(String, IDataContext)

    Declaration
    protected Person GetPerson(string name, IDataContext dataContext)
    Parameters
    Type Name Description
    System.String name
    IDataContext dataContext
    Returns
    Type Description
    Person

    GetQueryParent(String, User)

    Declaration
    protected BaseItem GetQueryParent(string parentId, User user)
    Parameters
    Type Name Description
    System.String parentId
    User user
    Returns
    Type Description
    BaseItem

    GetQueryParent(String, User, IDataContext)

    Declaration
    protected BaseItem GetQueryParent(string parentId, User user, IDataContext dataContext)
    Parameters
    Type Name Description
    System.String parentId
    User user
    IDataContext dataContext
    Returns
    Type Description
    BaseItem

    GetQueryParentFolder(String, User, IDataContext, Boolean)

    Declaration
    protected Folder GetQueryParentFolder(string parentId, User user, IDataContext dataContext, bool throwIfNotFound)
    Parameters
    Type Name Description
    System.String parentId
    User user
    IDataContext dataContext
    System.Boolean throwIfNotFound
    Returns
    Type Description
    Folder

    GetQueryParentFolder(String, User, Boolean)

    Declaration
    protected Folder GetQueryParentFolder(string parentId, User user, bool throwIfNotFound)
    Parameters
    Type Name Description
    System.String parentId
    User user
    System.Boolean throwIfNotFound
    Returns
    Type Description
    Folder

    GetSession(ISessionContext)

    Gets the session.

    Declaration
    protected SessionInfo GetSession(ISessionContext sessionContext)
    Parameters
    Type Name Description
    ISessionContext sessionContext
    Returns
    Type Description
    SessionInfo

    SessionInfo.

    GetStudio(String)

    Declaration
    protected Studio GetStudio(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    Studio

    GetStudio(String, IDataContext)

    Declaration
    protected Studio GetStudio(string name, IDataContext dataContext)
    Parameters
    Type Name Description
    System.String name
    IDataContext dataContext
    Returns
    Type Description
    Studio

    GetUserForRequest(AuthorizationInfo, String, Boolean)

    Declaration
    protected User GetUserForRequest(AuthorizationInfo auth, string requestedUserId, bool autoRevertToLoggedInUser = true)
    Parameters
    Type Name Description
    AuthorizationInfo auth
    System.String requestedUserId
    System.Boolean autoRevertToLoggedInUser
    Returns
    Type Description
    User

    GetUserForRequest(Guid, Boolean)

    Declaration
    protected User GetUserForRequest(Guid requestedUserId, bool autoRevertToLoggedInUser = true)
    Parameters
    Type Name Description
    System.Guid requestedUserId
    System.Boolean autoRevertToLoggedInUser
    Returns
    Type Description
    User

    GetUserForRequest(String, Boolean)

    Declaration
    protected User GetUserForRequest(string requestedUserId, bool autoRevertToLoggedInUser = true)
    Parameters
    Type Name Description
    System.String requestedUserId
    System.Boolean autoRevertToLoggedInUser
    Returns
    Type Description
    User

    GetUserGuidForRequest(AuthorizationInfo, ReadOnlySpan<Char>, Boolean)

    Declaration
    protected Guid GetUserGuidForRequest(AuthorizationInfo auth, ReadOnlySpan<char> requestedUserId, bool autoRevertToLoggedInUser = true)
    Parameters
    Type Name Description
    AuthorizationInfo auth
    System.ReadOnlySpan<System.Char> requestedUserId
    System.Boolean autoRevertToLoggedInUser
    Returns
    Type Description
    System.Guid

    GetUserIdForRequest(AuthorizationInfo, String, Boolean)

    Declaration
    protected long GetUserIdForRequest(AuthorizationInfo auth, string requestedUserId, bool autoRevertToLoggedInUser = true)
    Parameters
    Type Name Description
    AuthorizationInfo auth
    System.String requestedUserId
    System.Boolean autoRevertToLoggedInUser
    Returns
    Type Description
    System.Int64

    GetUserIdForRequest(String)

    Declaration
    protected long GetUserIdForRequest(string requestedUserId)
    Parameters
    Type Name Description
    System.String requestedUserId
    Returns
    Type Description
    System.Int64

    ParseIds(String)

    Declaration
    protected string[] ParseIds(string value)
    Parameters
    Type Name Description
    System.String value
    Returns
    Type Description
    System.String[]

    ParseLibraryIds(String)

    Declaration
    protected long[] ParseLibraryIds(string value)
    Parameters
    Type Name Description
    System.String value
    Returns
    Type Description
    System.Int64[]

    ParseLibraryIds(String, IDataContext)

    Declaration
    protected long[] ParseLibraryIds(string value, IDataContext dataContext)
    Parameters
    Type Name Description
    System.String value
    IDataContext dataContext
    Returns
    Type Description
    System.Int64[]

    ParseUserIds(String)

    Declaration
    protected long[] ParseUserIds(string value)
    Parameters
    Type Name Description
    System.String value
    Returns
    Type Description
    System.Int64[]

    SetContentDisposition(IDictionary<String, String>, String)

    Declaration
    public static void SetContentDisposition(IDictionary<string, string> headers, string name)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<System.String, System.String> headers
    System.String name

    SplitValue(String, Char)

    Declaration
    public static string[] SplitValue(string value, char delim)
    Parameters
    Type Name Description
    System.String value
    System.Char delim
    Returns
    Type Description
    System.String[]

    ToOptimizedResult<T>(T)

    To the optimized result.

    Declaration
    protected object ToOptimizedResult<T>(T result)
        where T : class
    Parameters
    Type Name Description
    T result

    The result.

    Returns
    Type Description
    System.Object

    System.Object.

    Type Parameters
    Name Description
    T

    TryParseEnums<T>(String)

    Declaration
    protected static T[] TryParseEnums<T>(string value)
        where T : struct
    Parameters
    Type Name Description
    System.String value
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    TryParseEnums<T>(String[])

    Declaration
    protected static T[] TryParseEnums<T>(string[] values)
        where T : struct
    Parameters
    Type Name Description
    System.String[] values
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    Implements

    IService
    IRequiresRequest

    Extension Methods

    Extensions.JsonClone<T>(T, IJsonSerializer)
    SDK
    On this Page
    Back to Top Copyright 2022 © EMBY LLC. Please see our terms of use and privacy policy.