-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Wrapper for the XING API, v1. -- -- This package is currently under development and not considered stable. -- The versioning follows http://semver.org and the first stable -- version will be release as 1.0.0. -- -- This package includes a couple of demo programs. By default these -- demos won't be built and you'll only install the library. You have to -- set the demos flag if you want to install them. To use these -- demos, you also have to obtain an API consumer key from -- https://dev.xing.com/applications (a test key will -- suffice). -- --
--   cabal install -f demos xing-api
--   
@package xing-api @version 0.1.3 module Web.XING -- | Create an OAuth consumer consumer :: ByteString -> ByteString -> OAuth -- | Create a request token (temporary credentials) getRequestToken :: (MonadResource m, MonadBaseControl IO m) => OAuth -> Manager -> m (RequestToken, URL) -- | URL to obtain OAuth verifier authorizeUrl :: OAuth -> Credential -> ByteString -- | Exchange request token for an access token (token credentials) getAccessToken :: (MonadResource m, MonadBaseControl IO m) => RequestToken -> Verifier -> OAuth -> Manager -> m (Credential, ByteString) -- | extract the token from the Credential token :: Credential -> ByteString -- | extract the secret from the Credential tokenSecret :: Credential -> ByteString -- | Convenient function to create Credential with OAuth Token and -- Token Secret. newCredential :: ByteString -> ByteString -> Credential -- | Callback uri to redirect after authentication (default: -- Nothing) oauthCallback :: OAuth -> Maybe ByteString -- | Low level API request interface apiRequest :: (MonadResource m, MonadBaseControl IO m) => OAuth -> Manager -> AccessToken -> Method -> ByteString -> m (Response ByteString) data APIError OAuthError :: String -> APIError TokenError :: String -> APIError CallError :: String -> APIError Throttled :: APIError Mapping :: APIError type RequestToken = Credential type Verifier = ByteString type AccessToken = Credential type URL = ByteString -- | Keeps track of open connections for keep-alive. If possible, you -- should share a single Manager between multiple threads and -- requests. data Manager :: * -- | Data type for OAuth client (consumer). -- -- The constructor for this data type is not exposed. Instead, you should -- use the def method or newOAuth function to retrieve a -- default instance, and then use the records below to make -- modifications. This approach allows us to add configuration options -- without breaking backwards compatibility. data OAuth :: * -- | Data type for redential. data Credential :: * Credential :: [(ByteString, ByteString)] -> Credential unCredential :: Credential -> [(ByteString, ByteString)] -- | HTTP Status. -- -- Only the statusCode is used for comparisons. -- -- Please use mkStatus to create status codes from code and -- message, or the Enum instance or the status code constants -- (like ok200). There might be additional record members in the -- future. -- -- Note that the Show instance is only for debugging. data Status :: * data Address Address :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Address street :: Address -> Maybe Text zipCode :: Address -> Maybe Text city :: Address -> Maybe Text province :: Address -> Maybe Text country :: Address -> Maybe Text email :: Address -> Maybe Text phone :: Address -> Maybe Text fax :: Address -> Maybe Text mobilePhone :: Address -> Maybe Text data Award Award :: Text -> Int -> (Maybe Text) -> Award data BirthDate FullDate :: Integer -> Int -> Int -> BirthDate DayOnly :: Int -> Int -> BirthDate data ProfessionalExperience ProfessionalExperience :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Text -> ProfessionalExperience pe_title :: ProfessionalExperience -> Maybe Text pe_beginDate :: ProfessionalExperience -> Maybe Text pe_endDate :: ProfessionalExperience -> Maybe Text pe_careerLevel :: ProfessionalExperience -> Maybe Text pe_description :: ProfessionalExperience -> Maybe Text pe_name :: ProfessionalExperience -> Maybe Text pe_tag :: ProfessionalExperience -> Maybe Text pe_companySize :: ProfessionalExperience -> Maybe Text pe_url :: ProfessionalExperience -> Maybe Text pe_industry :: ProfessionalExperience -> Text class User a userId :: User a => a -> UserId displayName :: User a => a -> Text permalink :: User a => a -> Text photoUrls :: User a => a -> PhotoUrls type UserId = Text type PhotoUrls = Map Text Text data FullUser newtype UserList UserList :: [FullUser] -> UserList unUserList :: UserList -> [FullUser] data Gender Male :: Gender Female :: Gender type Language = Text type Skill = Text birthDate :: FullUser -> Maybe BirthDate gender :: FullUser -> Gender firstName :: FullUser -> Text lastName :: FullUser -> Text activeEmail :: FullUser -> Maybe Text premiumServices :: FullUser -> [Text] badges :: FullUser -> [Text] languages :: FullUser -> Map Language (Maybe Skill) wants :: FullUser -> Maybe Text haves :: FullUser -> Maybe Text interests :: FullUser -> Maybe Text organisations :: FullUser -> Maybe Text pageName :: FullUser -> Text privateAddress :: FullUser -> Address businessAddress :: FullUser -> Address data MinimalUser MinimalUser :: UserId -> Text -> Text -> PhotoUrls -> MinimalUser -- | Get your id card https://dev.xing.com/docs/get/users/me/id_card getIdCard :: (MonadResource m, MonadBaseControl IO m) => OAuth -> Manager -> AccessToken -> m MinimalUser demoIdCard :: Value demoIdCard' :: ByteString demoUser :: Value demoUser' :: ByteString demoUsers :: Value demoUsers' :: ByteString -- | Get user details https://dev.xing.com/docs/get/users/:id getUsers :: (MonadResource m, MonadBaseControl IO m) => OAuth -> Manager -> AccessToken -> [UserId] -> m UserList -- | Lift a computation from the IO monad. liftIO :: MonadIO m => forall a. IO a -> m a -- | Create a new manager, use it in the provided function, and then -- release it. -- -- This function uses the default manager settings. For more control, use -- withManagerSettings. withManager :: (MonadIO m, MonadBaseControl IO m, MonadThrow m, MonadUnsafeIO m) => (Manager -> ResourceT m a) -> m a